Fixed zoom jumps on small zoom.

This commit is contained in:
GaidamakUA 2016-01-28 12:32:12 +02:00
parent 7e27c21496
commit 88f19f2ee5

View file

@ -970,7 +970,7 @@ public class OsmandMapTileView implements IMapDownloaderCallback {
baseZoom--;
}
if (!isZoomingAllowed(baseZoom, dz)) {
dz = 0;
dz = Math.signum(dz);
}
zoomToAnimate(baseZoom, dz, true);
rotateToAnimate(calcRotate);
@ -982,13 +982,13 @@ public class OsmandMapTileView implements IMapDownloaderCallback {
if (baseZoom > maxZoom) {
return false;
}
if (baseZoom >= maxZoom - 2 && dz > 1) {
if (baseZoom > maxZoom - 1 && dz > 1) {
return false;
}
if (baseZoom < minZoom) {
return false;
}
if (baseZoom <= minZoom + 2 && dz < -1) {
if (baseZoom < minZoom + 1 && dz < -1) {
return false;
}
return true;
@ -1082,5 +1082,4 @@ public class OsmandMapTileView implements IMapDownloaderCallback {
public Context getContext() {
return activity;
}
}
}