setMinZoom method

MapboxMap setMinZoom([
  1. num? minZoom
])

Sets or clears the map's minimum zoom level. If the map's current zoom level is lower than the new minimum, the map will zoom to the new minimum.

It is not always possible to zoom out and reach the set minZoom. Other factors such as map height may restrict zooming. For example, if the map is 512px tall it will not be possible to zoom below zoom 0 no matter what the minZoom is set to.

@param {number | null | undefined} minZoom The minimum zoom level to set (-2 - 24). If null or undefined is provided, the function removes the current minimum zoom (i.e. sets it to -2). @returns {MapboxMap} this @example map.setMinZoom(12.25);

Implementation

MapboxMap setMinZoom([num? minZoom]) =>
    MapboxMap.fromJsObject(jsObject.setMinZoom(minZoom));