fallbacl to static zoom center for now
This commit is contained in:
parent
d621ef850f
commit
360ea26204
2 changed files with 4 additions and 4 deletions
|
@ -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);
|
||||||
|
|
|
@ -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();
|
||||||
|
|
Loading…
Reference in a new issue