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;