Add a reset control to a map
add_reset_control.Rd
This function adds a reset control to a Mapbox GL or MapLibre GL map. The reset control allows users to return to the original zoom level and center.
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 "top-right".
- animate
Whether or not to animate the transition to the original map view; defaults to
TRUE
. IfFALSE
, the view will "jump" to the original view with no transition.- duration
The length of the transition from the current view to the original view, specified in milliseconds. This argument only works with
animate
isTRUE
.