setMaxZoom method
Sets or clears the map's maximum zoom level. If the map's current zoom level is higher than the new maximum, the map will zoom to the new maximum.
@param {number | null | undefined} maxZoom The maximum zoom level to set.
If null
or undefined
is provided, the function removes the current maximum zoom (sets it to 22).
@returns {MapboxMap} this
@example
map.setMaxZoom(18.75);
Implementation
MapboxMap setMaxZoom([num? maxZoom]) =>
MapboxMap.fromJsObject(jsObject.setMaxZoom(maxZoom));