Merge branch '4327-OnDoubleTap-trigger-camera-invalidation' into release-ios-3.2.0-android-4.0.0
This commit is contained in:
@@ -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.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user