문제

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