Question

I am trying to zoom out 2 zoom levels when clicking on the "-" button of the zoom control. I believe that I should use ZoomOut(2), but I am not sure how to assign this method to the - button. https://www.mapbox.com/mapbox.js/api/v1.6.2/l-map-class/

Thank you very much for your help

Was it helpful?

Solution

You shouldn't: instead of changing the behavior of the zoom control, you can copy it, rename it, and change the behavior of your new control, like L.control.doubleZoom

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top