Hello there!
We are trying to implement a feature, where user can click on a button and after clicking on a button - it should smoothly move-and-zoom presentation to specific coordinates (array of 4 points).
For that purposes we are using "goTo" command in following way:
mapView.goTo(points, {
animation: true,
duration: 5000,
easing: "ease-out"
});
When user click one button, during 5 seconds it should move presentation to position A. If user will click another button after 2 seconds after previous click, which should start move view to position B. But it doesn't. Instead it stoped in the middle on the way to position A.
I would expect, that "goTo" command should cancel previous animation and start new animation. For now it seems it does not work in that way.
I've created example on codesandbox: https://codesandbox.io/s/funny-brook-dxdkpt
Moreover, I can see from documentation, that "options" parameters in "goTo" callback supports a signal. But it looks like it does't work
const abortController = new AbortController();
const goToPromise = mapView.goTo(points.AFRICA, {
animation: true,
duration: 5000,
easing: "ease-out",
signal: abortController.signal
});
setTimeout(() => {
abortController.abort();
}, 2000)
I would expect that "goToPromise" will be rejected and animation will be stopped after 2 seconds. But it doesn't. After calling "abort" it continue the animation.