summaryrefslogtreecommitdiff
path: root/platform/android
diff options
context:
space:
mode:
authorŁukasz Paczos <lukas.paczos@gmail.com>2019-02-13 12:51:52 +0100
committerŁukasz Paczos <lukasz.paczos@mapbox.com>2019-02-13 13:50:13 +0100
commit98eac18a2133a7beda12fdfc27d6f88217d800cf (patch)
treeb0efc2c162d989929027ee92739f3d7df20cc93c /platform/android
parentca4648964a6180541dac3df1c1e848e67bc0d04e (diff)
downloadqtlocation-mapboxgl-98eac18a2133a7beda12fdfc27d6f88217d800cf.tar.gz
[android] invalidate the camera position when gesture finishes
Diffstat (limited to 'platform/android')
-rw-r--r--platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapGestureDetector.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapGestureDetector.java b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapGestureDetector.java
index cf2d20179f..43dd168016 100644
--- a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapGestureDetector.java
+++ b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapGestureDetector.java
@@ -878,6 +878,9 @@ final class MapGestureDetector {
private void dispatchCameraIdle() {
// we need to dispatch camera idle callback only if there is no other gestures in progress
if (noGesturesInProgress()) {
+ // invalidate the camera position, so that it's valid when fetched from the #onIdle event
+ // and doesn't rely on the last frame being rendered
+ transform.invalidateCameraPosition();
cameraChangeDispatcher.onCameraIdle();
}
}