[GIS] Setting max zoom in mapbox map

javascriptleafletmapbox

     mapObject = L.mapbox.map('mapDiv')
     .setView(defaultLocation,defaultZoom)
      .addControl(L.mapbox.geocoderControl('mapbox.places'));


             L.mapbox.styleLayer('mapbox://styles/gauravcatstech/civ82vos7008f2is5x92cp     vye').addTo(mapObject);

          L.control.scale({maxWidth: 100,metric: true, imperial: false}).addTo(mapObject);

How would i set max zoom in mapbox map..i have try object.maxZoome but sitt not able to set maxzoom

Best Answer

You can set it with options attribute during map initialization like this:

var options = {
  maxZoom: 13
};
mapObject = L.mapbox.map('mapDiv', undefined, options);

Details in the docs

Related Question