diff --git a/OsmAnd/src/net/osmand/plus/views/MultiTouchSupport.java b/OsmAnd/src/net/osmand/plus/views/MultiTouchSupport.java index f67352cbda..d1c2ddfac4 100644 --- a/OsmAnd/src/net/osmand/plus/views/MultiTouchSupport.java +++ b/OsmAnd/src/net/osmand/plus/views/MultiTouchSupport.java @@ -120,7 +120,7 @@ public class MultiTouchSupport { // return true; } else if(inZoomMode && actionCode == MotionEvent.ACTION_MOVE){ // Keep zoom center fixed or flexible - centerPoint = new PointF((x1 + x2) / 2, (y1 + y2) / 2); + //centerPoint = new PointF((x1 + x2) / 2, (y1 + y2) / 2); if(angleDefined) { angleRelative = MapUtils.unifyRotationTo360(angle - angleStarted); diff --git a/OsmAnd/src/net/osmand/plus/views/OsmandMapTileView.java b/OsmAnd/src/net/osmand/plus/views/OsmandMapTileView.java index 738e16fdf8..583771f485 100644 --- a/OsmAnd/src/net/osmand/plus/views/OsmandMapTileView.java +++ b/OsmAnd/src/net/osmand/plus/views/OsmandMapTileView.java @@ -1025,7 +1025,7 @@ public class OsmandMapTileView implements IMapDownloaderCallback { // Keep zoom center fixed or flexible calc.setLatLonCenter(initialCenterLatLon.getLatitude(), initialCenterLatLon.getLongitude()); - PointF updatedCenterPoint = multiTouchSupport.getCenterPoint(); + //PointF updatedCenterPoint = multiTouchSupport.getCenterPoint(); //calc.setLatLonCenter(initialViewport.getLatLonFromPixel(updatedCenterPoint.x, updatedCenterPoint.y).getLatitude(), // initialViewport.getLatLonFromPixel(updatedCenterPoint.x, updatedCenterPoint.y).getLongitude()); @@ -1035,8 +1035,8 @@ public class OsmandMapTileView implements IMapDownloaderCallback { // Keep zoom center fixed or flexible final QuadPoint cp = initialViewport.getCenterPixelPoint(); - //final LatLon r = calc.getLatLonFromPixel(cp.x + cp.x - initialMultiTouchCenterPoint.x, cp.y + cp.y - initialMultiTouchCenterPoint.y); - final LatLon r = calc.getLatLonFromPixel(cp.x + cp.x - updatedCenterPoint.x, cp.y + cp.y - updatedCenterPoint.y); + final LatLon r = calc.getLatLonFromPixel(cp.x + cp.x - initialMultiTouchCenterPoint.x, cp.y + cp.y - initialMultiTouchCenterPoint.y); + //final LatLon r = calc.getLatLonFromPixel(cp.x + cp.x - updatedCenterPoint.x, cp.y + cp.y - updatedCenterPoint.y); setLatLon(r.getLatitude(), r.getLongitude()); int baseZoom = initialViewport.getZoom();