Add a scale control to a map
add_scale_control.Rd
This function adds a scale control to a Mapbox GL or Maplibre GL map.
Arguments
- map
A map object created by the
mapboxgl
ormaplibre
functions.- position
The position of the control. Can be one of "top-left", "top-right", "bottom-left", or "bottom-right". Default is "bottom-left".
- unit
The unit of the scale. Can be either "imperial", "metric", or "nautical". Default is "metric".
- max_width
The maximum length of the scale control in pixels. Default is 100.