Bounds
Bounds for map viewport
Last updated
Bounds for map viewport
Last updated
takes bounds and opt as arguments and sets the center of the map with the given parameter. bounds parameter is a JSON object with two intercardinal directions (sw and ne), with latitude and longitude (lat, lng) respectively.
Retrieves the bounds attribute set in 'fitBounds()'
Intercardinal coordinates (ne, sw) with latitude and longitude
Required Parameter
Description
Type
bounds
Center these bounds in the viewport and use the highest zoom level up to and including the map.
JSON
Optional Parameter
Description
Type
padding
The amount of padding in pixels to add to the given bounds.
Numeric
linear
If true, the map transitions using Map#easeTo. If false, the map transitions using Map#flyTo.
Bool
maxZoom
The maximum zoom level to allow when the map view transitions to the specified bounds.
Numeric