summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrad Leege <bleege@gmail.com>2016-03-21 15:45:51 -0500
committerBrad Leege <bleege@gmail.com>2016-03-21 15:45:51 -0500
commitfb4d9d083da8bd44edefcbbc3eae7b54af239e0f (patch)
tree2b0305478e4b8e70de4872393afd904581882c58
parent1856b3aeeaf7ea11621cb11ea4b9a7b10d076cc2 (diff)
parentf992c12e5e66c7944ec64dd5c9a85bf0d7d9b58a (diff)
downloadqtlocation-mapboxgl-fb4d9d083da8bd44edefcbbc3eae7b54af239e0f.tar.gz
Merge branch '4327-OnDoubleTap-trigger-camera-invalidation' into release-ios-3.2.0-android-4.0.0
-rw-r--r--platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapView.java18
1 files changed, 18 insertions, 0 deletions
diff --git a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapView.java b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapView.java
index e66786ab22..391d8dd629 100644
--- a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapView.java
+++ b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapView.java
@@ -694,6 +694,9 @@ public class MapView extends FrameLayout {
} else {
mNativeMapView.scaleBy(0.5, x / mScreenDensity, y / mScreenDensity, MapboxConstants.ANIMATION_DURATION);
}
+
+ // work around to invalidate camera position
+ postDelayed(new ZoomInvalidator(mMapboxMap), MapboxConstants.ANIMATION_DURATION);
}
//
@@ -2543,6 +2546,21 @@ public class MapView extends FrameLayout {
}
}
+ private static class ZoomInvalidator implements Runnable{
+
+ private MapboxMap mapboxMap;
+
+ public ZoomInvalidator(MapboxMap mapboxMap) {
+ this.mapboxMap = mapboxMap;
+ }
+
+ @Override
+ public void run() {
+ // invalidate camera position
+ mapboxMap.getCameraPosition();
+ }
+ }
+
/**
* Definition of a map change event.
*