Skip to content

navigation_control

Stable

Zoom buttons and a compass.

Generated from the component's definition in the library, so it always matches the version this demo runs.

Attribute Type Default Description
id required string — Unique identifier for the control
map_id required string — ID of the map to add the control to
position string "top-right" Control position: "top-left", "top-right", "bottom-left", "bottom-right". Defaults to "top-right". A new value moves the control to that corner
show_compass boolean true Show compass button for rotation. Defaults to true. MapLibre builds the buttons when it creates the control, so a new value replaces the control with a new one, in the same place
show_zoom boolean true Show zoom buttons (+/-). Defaults to true. A new value replaces the control, as show_compass does
visualize_pitch boolean false Show pitch visualization in compass. Defaults to false. A new value replaces the control, as show_compass does
global attributes global — Any other HTML attribute, passed on to the component's element.