In interactive mode, Mapbox fires spurious mousemove events on drag/pan
thully opened this issue · 1 comments
thully commented
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 commented
can you post the code here?