Make sure zoom is rounded to integer
This commit is contained in:
parent
e499a16e1a
commit
669f4b8747
1 changed files with 3 additions and 2 deletions
|
@ -282,9 +282,10 @@ public class OsmandMapTileView extends SurfaceView implements IMapDownloaderCall
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setZoom(float zoom) {
|
public void setZoom(float zoom) {
|
||||||
if (mainLayer != null && zoom <= mainLayer.getMaximumShownMapZoom() && zoom >= mainLayer.getMinimumShownMapZoom()) {
|
if (mainLayer != null && zoom <= mainLayer.getMaximumShownMapZoom() + 0.01 && zoom >= mainLayer.getMinimumShownMapZoom() - 0.01) {
|
||||||
animatedDraggingThread.stopAnimating();
|
animatedDraggingThread.stopAnimating();
|
||||||
this.zoom = zoom;
|
// avoid round error
|
||||||
|
this.zoom = zoom + 0.001f;
|
||||||
refreshMap();
|
refreshMap();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue