Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
f87f7bb5a3
2 changed files with 7 additions and 3 deletions
|
@ -119,6 +119,7 @@ public class MultiTouchSupport {
|
|||
// }
|
||||
// return true;
|
||||
} else if(inZoomMode && actionCode == MotionEvent.ACTION_MOVE){
|
||||
centerPoint = new PointF((x1 + x2) / 2, (y1 + y2) / 2);
|
||||
if(angleDefined) {
|
||||
angleRelative = MapUtils.unifyRotationTo360(angle - angleStarted);
|
||||
}
|
||||
|
|
|
@ -1025,14 +1025,17 @@ public class OsmandMapTileView implements IMapDownloaderCallback {
|
|||
float dx = cp.x - initialMultiTouchCenterPoint.x;
|
||||
float dy = cp.y - initialMultiTouchCenterPoint.y;
|
||||
final RotatedTileBox calc = initialViewport.copy();
|
||||
calc.setLatLonCenter(initialCenterLatLon.getLatitude(), initialCenterLatLon.getLongitude());
|
||||
//calc.setLatLonCenter(initialCenterLatLon.getLatitude(), initialCenterLatLon.getLongitude());
|
||||
PointF updatedCenterPoint = multiTouchSupport.getCenterPoint();
|
||||
calc.setLatLonCenter(initialViewport.getLatLonFromPixel(updatedCenterPoint.x, updatedCenterPoint.y).getLatitude(),
|
||||
initialViewport.getLatLonFromPixel(updatedCenterPoint.x, updatedCenterPoint.y).getLongitude());
|
||||
|
||||
float calcRotate = calc.getRotate() + angle;
|
||||
calc.setRotate(calcRotate);
|
||||
calc.setZoomAndAnimation(initialViewport.getZoom(),
|
||||
dz, initialViewport.getZoomFloatPart());
|
||||
final LatLon r = calc.getLatLonFromPixel(cp.x + dx, cp.y + dy);
|
||||
setLatLon(r.getLatitude(), r.getLongitude());
|
||||
//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)) {
|
||||
dz--;
|
||||
|
|
Loading…
Reference in a new issue