5
     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

1 Answer 1

6

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.