experiment with moveable zoom centerPoint (3)

This commit is contained in:
sonora 2016-12-30 11:32:38 +01:00
parent 1fe172ce27
commit 68b5c0d24e

View file

@ -1037,8 +1037,12 @@ public class OsmandMapTileView implements IMapDownloaderCallback {
//final QuadPoint cp = initialViewport.getCenterPixelPoint();
//float dx = cp.x - initialMultiTouchCenterPoint.x;
//float dy = cp.y - initialMultiTouchCenterPoint.y;
//final LatLon r = calc.getLatLonFromPixel(cp.x + dx, cp.y + dy);
//setLatLon(r.getLatitude(), r.getLongitude());
final QuadPoint cp = getCurrentRotatedTileBox().copy().getCenterPixelPoint();
float dx = cp.x - updatedCenterPoint.x;
float dy = cp.y - updatedCenterPoint.y;
final LatLon r = calc.getLatLonFromPixel(cp.x + dx, cp.y + dy);
setLatLon(r.getLatitude(), r.getLongitude());
int baseZoom = initialViewport.getZoom();
while (initialViewport.getZoomFloatPart() + dz > 1 && isZoomingAllowed(baseZoom, dz)) {