Skip to content
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

In interactive mode, Mapbox fires spurious mousemove events on drag/pan #153

Open
thully opened this issue Jul 9, 2022 · 1 comment
Open

Comments

@thully
Copy link

thully commented Jul 9, 2022

If you enable interactive mode (by setting the interactive option to true), Mapbox's mousemove event will fire while panning the map, with event lngLat locations that don't reflect the actual cursor position. This does not happen when using Leaflet events, though those apply to the entire map and are thus not well suited to layer-specific functionality.

Currently, to work around this, I set a flag when Leaflet fires a movestart event (and unset it on moveend), and ignore all Mapbox events while the flag is set. Ideally the library would handle this properly to ensure that spurious events are not fired...

@cjp1986
Copy link

cjp1986 commented Apr 13, 2023

can you post the code here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants