-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add zoomstart
/ zoom
/ zoomend
events
#1958
Comments
I'm now using the "moveend" event to trigger execution of the code that I want to run after the user has zoomed in or out with the navigation control. map.on('moveend', function (e) { // do something }); The side effect is that the code is also triggered when the user drags the map. I think "zoomstart" and "zoomend" events (similar to "dragstart" and "dragend") would be desirable ? |
Yes, I am planning to add these - I don't think it's ticketed yet, so I'll just use this issue for tracking it. |
zoomstart
/ zoom
/ zoomend
events
zoomstart
/ zoom
/ zoomend
eventszoomstart
/ zoom
/ zoomend
events
+1 |
@barrylachapelle these have already been added https://www.mapbox.com/mapbox-gl-js/api/#map.event:zoomend |
I want to bind a zoom handler to the navigation control, but did not find how to do this in the API or examples.
I tried the following, but this event was not called :
map.on('boxzoomend', function (e) { //do something });
PS. I have disabled zooming in or out with the mouse scroll wheel
The text was updated successfully, but these errors were encountered: