From a8dcdd70c40afef5f597fd7227ac3d6603c193b3 Mon Sep 17 00:00:00 2001 From: Denis Date: Mon, 3 Nov 2014 16:13:23 +0200 Subject: [PATCH] Max zoom can't be more than 22 --- OsmAnd/src/net/osmand/plus/activities/MapActivity.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/OsmAnd/src/net/osmand/plus/activities/MapActivity.java b/OsmAnd/src/net/osmand/plus/activities/MapActivity.java index 6ca04420e0..d8464b3676 100644 --- a/OsmAnd/src/net/osmand/plus/activities/MapActivity.java +++ b/OsmAnd/src/net/osmand/plus/activities/MapActivity.java @@ -462,6 +462,10 @@ public class MapActivity extends AccessibleActivity implements // changeLocation = false; // } final int newZoom = mapView.getZoom() + stp; + if (newZoom > 22) { + AccessibleToast.makeText(this, "Max zoom", Toast.LENGTH_SHORT).show(); //$NON-NLS-1$ + return; + } mapView.getAnimatedDraggingThread().startZooming(newZoom, changeLocation); if (app.accessibilityEnabled()) AccessibleToast.makeText(this, getString(R.string.zoomIs) + " " + newZoom, Toast.LENGTH_SHORT).show(); //$NON-NLS-1$