From a4374d7eb989f3429c2aa6fceba289f9a95fdabd Mon Sep 17 00:00:00 2001 From: Victor Shcherb Date: Tue, 12 Jul 2011 12:41:40 +0200 Subject: [PATCH] Attempt to fix 537 --- OsmAnd/src/net/osmand/plus/render/MapVectorLayer.java | 4 ++-- OsmAnd/src/net/osmand/plus/views/BaseMapLayer.java | 2 +- OsmAnd/src/net/osmand/plus/views/MapTileLayer.java | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/render/MapVectorLayer.java b/OsmAnd/src/net/osmand/plus/render/MapVectorLayer.java index ef5413eb38..7141889fb7 100644 --- a/OsmAnd/src/net/osmand/plus/render/MapVectorLayer.java +++ b/OsmAnd/src/net/osmand/plus/render/MapVectorLayer.java @@ -103,10 +103,10 @@ public class MapVectorLayer extends BaseMapLayer { resourceManager.updateRendererMap(rotatedTileBox); // does it slow down Map refreshing ? // Arguments : 1. Map request to read data slows whole process // 2. It works in operating memory - if (!warningToSwitchMapShown) { + if (warningToSwitchMapShown < 3) { if (!resourceManager.getRenderer().containsLatLonMapData(view.getLatitude(), view.getLongitude(), view.getZoom())) { Toast.makeText(view.getContext(), R.string.switch_to_raster_map_to_see, Toast.LENGTH_LONG).show(); - warningToSwitchMapShown = true; + warningToSwitchMapShown++; } } } diff --git a/OsmAnd/src/net/osmand/plus/views/BaseMapLayer.java b/OsmAnd/src/net/osmand/plus/views/BaseMapLayer.java index 413f0d61fd..2cb23f74f5 100644 --- a/OsmAnd/src/net/osmand/plus/views/BaseMapLayer.java +++ b/OsmAnd/src/net/osmand/plus/views/BaseMapLayer.java @@ -3,7 +3,7 @@ package net.osmand.plus.views; public abstract class BaseMapLayer implements OsmandMapLayer { private int alpha = 255; - protected boolean warningToSwitchMapShown = false; + protected int warningToSwitchMapShown = 0; public int getMaximumShownMapZoom(){ return 21; diff --git a/OsmAnd/src/net/osmand/plus/views/MapTileLayer.java b/OsmAnd/src/net/osmand/plus/views/MapTileLayer.java index f1cd73ca78..16ab5b2cd2 100644 --- a/OsmAnd/src/net/osmand/plus/views/MapTileLayer.java +++ b/OsmAnd/src/net/osmand/plus/views/MapTileLayer.java @@ -206,10 +206,10 @@ public class MapTileLayer extends BaseMapLayer { } } - if(mainMap && !oneTileShown && !useInternet && !warningToSwitchMapShown){ + if(mainMap && !oneTileShown && !useInternet && warningToSwitchMapShown < 3){ if(resourceManager.getRenderer().containsLatLonMapData(view.getLatitude(), view.getLongitude(), nzoom)){ Toast.makeText(view.getContext(), R.string.switch_to_vector_map_to_see, Toast.LENGTH_LONG).show(); - warningToSwitchMapShown = true; + warningToSwitchMapShown++; } } }