Documentation Index
Fetch the complete documentation index at: https://rodrito.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
ScaleBar
TheScaleBar component displays a visual scale showing map distances in metric and/or imperial units.
Props
Position of the scale bar on the mapOptions:
'left-top''left-middle''left-bottom''right-top''right-middle''right-bottom''top-left''top-center''top-right''bottom-left''bottom-center''bottom-right'(default)
Disable the scale bar
Control visibility of the scale bar
Basic Usage
Custom Position
With Other Controls
Dynamic Behavior
The scale bar automatically updates:- When the map zoom level changes
- When the map is panned to different latitudes (scale varies by latitude)
- Shows appropriate units based on zoom level
Units Display
The scale bar shows:- Metric (meters/kilometers)
- Imperial (feet/miles)
- Both units simultaneously
- At high zoom: meters/feet
- At low zoom: kilometers/miles
Positioning Examples
- Bottom Right
- Bottom Left
- Top Right
Conditional Visibility
Full Controls Layout
Use Cases
Distance Reference
Help users understand real-world distances on the map
Planning
Useful for route planning and measuring areas
Navigation
Essential for navigation applications
Context
Provides geographic context at different zoom levels
Accessibility
The scale bar provides visual reference for:- Screen magnification users
- Print versions of the map
- Screenshots and documentation
See Also
ZoomControl
Zoom controls
MapSettings
Map configuration
HereMap
Main map component