fallbacl to static zoom center for now

This commit is contained in:
sonora 2016-12-30 14:57:55 +01:00
parent d621ef850f
commit 360ea26204
2 changed files with 4 additions and 4 deletions

View file

@ -120,7 +120,7 @@ public class MultiTouchSupport {
// return true; // return true;
} else if(inZoomMode && actionCode == MotionEvent.ACTION_MOVE){ } else if(inZoomMode && actionCode == MotionEvent.ACTION_MOVE){
// Keep zoom center fixed or flexible // 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) { if(angleDefined) {
angleRelative = MapUtils.unifyRotationTo360(angle - angleStarted); angleRelative = MapUtils.unifyRotationTo360(angle - angleStarted);

View file

@ -1025,7 +1025,7 @@ public class OsmandMapTileView implements IMapDownloaderCallback {
// Keep zoom center fixed or flexible // Keep zoom center fixed or flexible
calc.setLatLonCenter(initialCenterLatLon.getLatitude(), initialCenterLatLon.getLongitude()); calc.setLatLonCenter(initialCenterLatLon.getLatitude(), initialCenterLatLon.getLongitude());
PointF updatedCenterPoint = multiTouchSupport.getCenterPoint(); //PointF updatedCenterPoint = multiTouchSupport.getCenterPoint();
//calc.setLatLonCenter(initialViewport.getLatLonFromPixel(updatedCenterPoint.x, updatedCenterPoint.y).getLatitude(), //calc.setLatLonCenter(initialViewport.getLatLonFromPixel(updatedCenterPoint.x, updatedCenterPoint.y).getLatitude(),
// initialViewport.getLatLonFromPixel(updatedCenterPoint.x, updatedCenterPoint.y).getLongitude()); // initialViewport.getLatLonFromPixel(updatedCenterPoint.x, updatedCenterPoint.y).getLongitude());
@ -1035,8 +1035,8 @@ public class OsmandMapTileView implements IMapDownloaderCallback {
// Keep zoom center fixed or flexible // Keep zoom center fixed or flexible
final QuadPoint cp = initialViewport.getCenterPixelPoint(); 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 - 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 - updatedCenterPoint.x, cp.y + cp.y - updatedCenterPoint.y);
setLatLon(r.getLatitude(), r.getLongitude()); setLatLon(r.getLatitude(), r.getLongitude());
int baseZoom = initialViewport.getZoom(); int baseZoom = initialViewport.getZoom();