From d1816150d1551971f259ddcb47972e2f982a7471 Mon Sep 17 00:00:00 2001 From: GaidamakUA Date: Thu, 9 Jun 2016 17:05:05 +0300 Subject: [PATCH] Hardcoding maximum zoom for gestures to 21. fixes #2648 --- OsmAnd/src/net/osmand/plus/views/BaseMapLayer.java | 3 ++- OsmAnd/src/net/osmand/plus/views/OsmandMapTileView.java | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/views/BaseMapLayer.java b/OsmAnd/src/net/osmand/plus/views/BaseMapLayer.java index c0a9b70ef3..d23af4351e 100644 --- a/OsmAnd/src/net/osmand/plus/views/BaseMapLayer.java +++ b/OsmAnd/src/net/osmand/plus/views/BaseMapLayer.java @@ -2,11 +2,12 @@ package net.osmand.plus.views; public abstract class BaseMapLayer extends OsmandMapLayer { + public static final int DEFAULT_MAX_ZOOM = 21; private int alpha = 255; protected int warningToSwitchMapShown = 0; public int getMaximumShownMapZoom(){ - return 21; + return DEFAULT_MAX_ZOOM; } public int getMinimumShownMapZoom(){ diff --git a/OsmAnd/src/net/osmand/plus/views/OsmandMapTileView.java b/OsmAnd/src/net/osmand/plus/views/OsmandMapTileView.java index 9520312773..5093824825 100644 --- a/OsmAnd/src/net/osmand/plus/views/OsmandMapTileView.java +++ b/OsmAnd/src/net/osmand/plus/views/OsmandMapTileView.java @@ -408,7 +408,7 @@ public class OsmandMapTileView implements IMapDownloaderCallback { public void setMainLayer(BaseMapLayer mainLayer) { this.mainLayer = mainLayer; int zoom = currentViewport.getZoom(); - maxZoom = mainLayer.getMaximumShownMapZoom(); + maxZoom = BaseMapLayer.DEFAULT_MAX_ZOOM; minZoom = mainLayer.getMinimumShownMapZoom() + 1; if (maxZoom < zoom) { zoom = maxZoom;