[android] #4327 - OnDoubleTap needs to trigger camera invalidation after a zoom occurs

This commit is contained in:
Tobrun
2016-03-21 15:08:06 +01:00
committed by Brad Leege
parent ead63abadd
commit 8508aea6fb

View File

@@ -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.
*