You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm struggling to understand how to achieve smooth zoom transitions when changing the view state of a controlled Map component. If I understand the docs correctly, a state change should trigger an animated transition with linear interpolation. Much like you'd get in the vanilla JS API, when using map.easeTo().
But in my case, the zoom change is instant, in a single step. Is there any additional config needed to enable smooth transitions?
Also: I'm using mapLibre rather than MapBox GL JS. Could this be the reason?
The code I'm using for init is pretty much as simple as it gets:
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I'm struggling to understand how to achieve smooth zoom transitions when changing the view state of a controlled Map component. If I understand the docs correctly, a state change should trigger an animated transition with linear interpolation. Much like you'd get in the vanilla JS API, when using
map.easeTo()
.But in my case, the zoom change is instant, in a single step. Is there any additional config needed to enable smooth transitions?
Also: I'm using mapLibre rather than MapBox GL JS. Could this be the reason?
The code I'm using for init is pretty much as simple as it gets:
And then there's an external zoom button component that does this:
Beta Was this translation helpful? Give feedback.
All reactions