Вопрос

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

Это было полезно?

Решение

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

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top