Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

onCameraChange is not always called for the final position in the animation #7350

Closed
altafrm3d opened this issue Dec 8, 2016 · 3 comments · Fixed by #7354
Closed

onCameraChange is not always called for the final position in the animation #7350

altafrm3d opened this issue Dec 8, 2016 · 3 comments · Fixed by #7354
Assignees
Labels
Android Mapbox Maps SDK for Android

Comments

@altafrm3d
Copy link

Steps to trigger behavior

oncamerachange-behavingstrangely

onCameraChange i am calculating the Zoom level of Raster Tiles (using Math.round(cameraPosition.zoom)) and labeling it as shown

Expected behavior

onCameraChange is always called for the final position in the animation, so in my case, it should always update the label when the camera change is completed and the tiles are updated

Actual behavior

onCameraChange is not always called for the final position in the animation, but it misses a frequent number of times as shown in the gif

Platform: Android
Mapbox SDK version:

@tobrun
Copy link
Member

tobrun commented Dec 8, 2016

@altafrm3d thank you adding a gif to explain the issue, could you add the version where you are having this issue?

@altafrm3d
Copy link
Author

altafrm3d commented Dec 8, 2016

@tobrun I am not sure what you meant by the version, this is the last commit in the logs, maybe that is already enough for you

commit 11229d7
Author: Konstantin Käfer [email protected]
Date: Wed Dec 7 12:37:52 2016 +0100

[build] bump mason to update Android compile flags

@tobrun tobrun added the Android Mapbox Maps SDK for Android label Dec 8, 2016
@tobrun tobrun self-assigned this Dec 8, 2016
@tobrun tobrun added this to the android-v5.0.0 milestone Dec 8, 2016
@tobrun
Copy link
Member

tobrun commented Dec 8, 2016

Thank for confirming that you are building from master. Note that you can also use stable versions that will not have this issue or build from the release branch release-android-v4.2.0. I changed the invalidation recently in #6532 to not refresh the camera position too much, it seems that gestures aren't always covert. I'm going to patch this up by hooking into setGestureInProgress(false) to determine if we need to notify OnCameraChangeListener for a change.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Android Mapbox Maps SDK for Android
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants