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
{{ message }}
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.
as mentioned in the title I'm a little confused about the behavior of the onCancel() method in the MapboxMap.CancelableCallback(). It never seems to be called when stopping a camera animation e.g. by user input (note the code snippet below to see my implementation). Currently I'm running on mapbox-android-sdk:4.2.0-beta.4.
According to the API documentation onCancel() should be called:
If the animation stops due to interruption by [...] a user gesture (1)
or if the animation did not complete normally. (2)
So the expected behavior would be: onCancel() get's called if interrupting the camera animation by a user gesture.
But the actual behavior is quite more strange: Regardless of whether the animation finishes as planned or gets interrupted onFinished() gets called making it impossible to distinguish between a successful completed animation or an incomplete one.
I noticed the same and implemented a fix for this yesterday. This was merged with the 4.2.0 release branch and will be available with next snapshot/beta/release. Thank you for reaching out!
Hey,
as mentioned in the title I'm a little confused about the behavior of the
onCancel()
method in theMapboxMap.CancelableCallback()
. It never seems to be called when stopping a camera animation e.g. by user input (note the code snippet below to see my implementation). Currently I'm running onmapbox-android-sdk:4.2.0-beta.4
.According to the API documentation
onCancel()
should be called:or if the animation did not complete normally. (2)
So the expected behavior would be:
onCancel()
get's called if interrupting the camera animation by a user gesture.But the actual behavior is quite more strange: Regardless of whether the animation finishes as planned or gets interrupted
onFinished()
gets called making it impossible to distinguish between a successful completed animation or an incomplete one.Example code:
The text was updated successfully, but these errors were encountered: