Skip to content

Is it okay to use imperative method such as flyTo in a controlled map? #2294

Answered by Pessimistress
milhamm asked this question in Q&A
Discussion options

You must be logged in to vote

If you call flyTo on a controlled map, onMove will be invoked as the map attempts to animate its camera. Your app is responsible of listening to the event and update the props.

https://visgl.github.io/react-map-gl/docs/api-reference/map#onmove

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by milhamm
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants