I want to limit the users max zoom level with inputs (muse scroll etc.) and buttons. In other words, I limit the "maxZoom" to -lets say- level9. But I still want to be able to zoom to level10 in special conditions. When I set the maxZoom, it obviously does not let me zoom more in any way, so wht is my solution in this case?
For setting maximum zoom level :
map._layersMaxZoom=15 (which sets the maximum zoomlevel as 15)
Similarly we can set minimum zoom level:
map._layersMinZoom=2, (which sets minimum zoomlevel as 2).
Another way of doing the same-
map.options.maxZoom = 15;
map.options.minZoom = 10;