react-map-gl icon indicating copy to clipboard operation
react-map-gl copied to clipboard

onViewportChange not triggered for GeolocationControl

Open derwaldgeist opened this issue 5 years ago • 4 comments

If you click on the GeolocationControl, the map zooms into a certain zoom level. But this change is not reported via onViewportChange. This leads to errorneous behaviour if you click on another control that sets the zoom based on the zoom value stored in the state.

This is similar to #234, but that issue refers to the NavigationControl.

derwaldgeist avatar Jan 24 '20 13:01 derwaldgeist

Hi @derwaldgeist

It seems that originalEvent event is missing in GeolocateControl, the same way as in https://github.com/urbica/react-map-gl/issues/234

So that needs to be fixed in the mapbox-gl-js

stepankuzmin avatar Jan 24 '20 14:01 stepankuzmin

I saw the issue in mapbox-gl-js has been closed, but is there already a build including this?

derwaldgeist avatar Jan 25 '20 14:01 derwaldgeist

The fix is only for NavigationControl, GeolocateControl needs a separate fix

stepankuzmin avatar Jan 25 '20 15:01 stepankuzmin

Ok, thanks. I added a not about this to the issue that was mentioned in #234. Do you think that's enough, or shall I try to setup another issue in the mapbox-gl repo?

derwaldgeist avatar Jan 25 '20 16:01 derwaldgeist