Set the map bounds
Usage
set_bounds(
map,
bounds,
padding = 50,
options = list(maxZoom = map$maxZoom, linear = FALSE)
)Arguments
- map
The map or map proxy object.
- bounds
One of two formats:
A list of two coordinate pairs:
list(list(lon1, lat1), list(lon2, lat2))An
sfobject, which will be converted to a bounding box
- padding
The padding around the bounds in pixels. Default is 50.
- options
A list of extra options to pass directly to the MapLibre GL JS
fitBoundsfunction.maxZoom: The maximum zoom level to set. Default is the object's
maxZoom.linear: The type of map transition, see the above
fitBoundsfunction documentation for more information.
