Navigation

Provides zoom buttons and a compass.

type: navigationstandalonestable

What it does

Navigation is the zoom buttons plus a compass.

The compass matters when a map can rotate. It shows where north is, and clicking it returns north to the top. It appears only when the current map engine can rotate.

Scroll, double-click, pinch, and keyboard controls still work.

Using it

In your own map

Add navigation with a position, usually top-right.

Turning both off leaves an empty control. If you want no navigation, leave the entry out.

Extending it

Bearing and pitch are read through the map adapter, so the same control can be used with each engine.

Config typenavigation
Element<webmapx-navigation-control>
Placementstandalone
Sourcesrc/components/webmapx-navigation-control.ts
Teststests/tool-registration.test.ts
RelatedzoomLevel, fullscreen, scale