Skip to content

feat: add compass and scale controls to map#3328

Open
pierreeurope wants to merge 1 commit intokeplergl:masterfrom
pierreeurope:fix/compass-scale-controls-2562
Open

feat: add compass and scale controls to map#3328
pierreeurope wants to merge 1 commit intokeplergl:masterfrom
pierreeurope:fix/compass-scale-controls-2562

Conversation

@pierreeurope
Copy link
Copy Markdown
Contributor

Summary

Adds NavigationControl (compass with pitch visualization) and ScaleControl from react-map-gl as native map controls on the map.

  • Compass (bottom-right): Shows north orientation and allows pitch visualization. Clicking resets bearing/pitch to north.
  • Scale bar (bottom-left): Shows a distance scale that updates with zoom level.

These are standard map controls available in react-map-gl/maplibre-gl that help users orient themselves and understand distances.

Changes

  • src/components/src/map-container.tsx: Import NavigationControl and ScaleControl from react-map-gl and add them as children of the bottom map component.

Closes #2562

Add NavigationControl (compass with pitch visualization) and ScaleControl
from react-map-gl as native map controls. The compass is positioned at
bottom-right and the scale bar at bottom-left.

These are standard map controls that help users orient themselves and
understand distances on the map.

Closes keplergl#2562

Signed-off-by: pierreeurope <pierre.europe@pm.me>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature Request] Add a compass and a scale

1 participant