Search

Finds a place by name and moves the map there.

type: searchtoolbarstable

What it does

Search for a place by name and the map moves to the result. By default Search uses Nominatim, OpenStreetMap's geocoder.

Results can include geometry, not only a point. A city result can frame the city outline instead of centering on a single point.

A result can also be kept. With pinning turned on, the found geometry stays as its own layer, so it can be measured, analyzed, or buffered.

Using it

  1. Open search and type. Results appear as you go.
  2. Pick one. The map moves to the result, framed on the geometry rather than centered on a point.
  3. Where pinning is enabled, the result stays on the map and appears in the legend like any other layer.

Nominatim is a shared public service with a usage policy: it is for occasional human searching, not for bulk lookups. A map used heavily should point at its own geocoder.

In your own map

Add search to a toolbar. Everything about the provider is configurable:

Extending it

The selection is emitted as an event, so a host app can store the result or pass it to another workflow.

Config typesearch
Element<webmapx-search-tool>
Placementtoolbar
Sourcesrc/components/webmapx-search-tool.ts
Teststests/tool-registration.test.ts
RelatedlayerTree, info, routing