-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Data doesn't update when map moves #2100
Comments
I figure this is because when dragging the 'map', it is actually dragging the data layer, which internally moves the map to match data, and the binding doesn't happen the other way round. I've tried listening to the move event on the map, but I'm not sure what methods to call to get the data to redraw in the right place. Some random things I've tried without success: map.on('move', (e) => {
myDeck.controller._controls.eventManager.moveInput.callback(e);
myDeck.layerManager.setNeedsRedraw();
myDeck.layerManager.setNeedsUpdate();
}); |
A little bit of background: user interaction is actually handled by deck.gl instead of Mapbox. We do not subscribe to Mapbox's Because of this, we do not officially support using mapbox's controls to manipulate the viewport at the moment. This is rather unfortunate. With that said, you can use this dirty hack: |
Thanks for the update, the 'hack' will do the job for the time being, much appreciated. |
Has something changed in 6.0.1? |
I have used the hack. the hack has no use . Do u have some any other method to solve the problem? |
Actual Result
Using map controls such as zoom, geolocation etc doesn't update the data when the map moves. When dragging the map after, it returns to its original position.
Expected Result
The data should re-render on each frame the map moves.
Reproduce Steps
https://codepen.io/SteveEdson/pen/OwRrKd <-- click the zoom button
To Do List
The text was updated successfully, but these errors were encountered: