Attempt to fix 537

This commit is contained in:
Victor Shcherb 2011-07-12 12:41:40 +02:00
parent 7dd5f3bdbf
commit a4374d7eb9
3 changed files with 5 additions and 5 deletions

View file

@ -103,10 +103,10 @@ public class MapVectorLayer extends BaseMapLayer {
resourceManager.updateRendererMap(rotatedTileBox); resourceManager.updateRendererMap(rotatedTileBox);
// does it slow down Map refreshing ? // does it slow down Map refreshing ?
// Arguments : 1. Map request to read data slows whole process // 2. It works in operating memory // 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())) { 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(); Toast.makeText(view.getContext(), R.string.switch_to_raster_map_to_see, Toast.LENGTH_LONG).show();
warningToSwitchMapShown = true; warningToSwitchMapShown++;
} }
} }
} }

View file

@ -3,7 +3,7 @@ package net.osmand.plus.views;
public abstract class BaseMapLayer implements OsmandMapLayer { public abstract class BaseMapLayer implements OsmandMapLayer {
private int alpha = 255; private int alpha = 255;
protected boolean warningToSwitchMapShown = false; protected int warningToSwitchMapShown = 0;
public int getMaximumShownMapZoom(){ public int getMaximumShownMapZoom(){
return 21; return 21;

View file

@ -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)){ 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(); Toast.makeText(view.getContext(), R.string.switch_to_vector_map_to_see, Toast.LENGTH_LONG).show();
warningToSwitchMapShown = true; warningToSwitchMapShown++;
} }
} }
} }