diff --git a/OsmAnd/src/net/osmand/plus/sherpafy/SherpafyStageItineraryFragment.java b/OsmAnd/src/net/osmand/plus/sherpafy/SherpafyStageItineraryFragment.java index 6a324fee1f..cd0cffaeeb 100644 --- a/OsmAnd/src/net/osmand/plus/sherpafy/SherpafyStageItineraryFragment.java +++ b/OsmAnd/src/net/osmand/plus/sherpafy/SherpafyStageItineraryFragment.java @@ -36,6 +36,7 @@ public class SherpafyStageItineraryFragment extends SherpafyStageInfoFragment im osmandMapTileView.removeAllLayers(); MapVectorLayer mapVectorLayer = new MapVectorLayer(null); MapTextLayer mapTextLayer = new MapTextLayer(); + mapTextLayer.setAlwaysVisible(true); // 5.95 all labels osmandMapTileView.addLayer(mapTextLayer, 5.95f); osmandMapTileView.addLayer(mapVectorLayer, 0.5f); @@ -78,6 +79,7 @@ public class SherpafyStageItineraryFragment extends SherpafyStageInfoFragment im } protected void onPostExecute(Void result) { gpxLayer.setGivenGpx(gpx); + calculateLatLon(); osmandMapTileView.refreshMap(); }; }.execute((Void)null); diff --git a/OsmAnd/src/net/osmand/plus/views/MapTextLayer.java b/OsmAnd/src/net/osmand/plus/views/MapTextLayer.java index 08a9117417..fc9fd4ffca 100644 --- a/OsmAnd/src/net/osmand/plus/views/MapTextLayer.java +++ b/OsmAnd/src/net/osmand/plus/views/MapTextLayer.java @@ -24,6 +24,8 @@ public class MapTextLayer extends OsmandMapLayer { public static final int TEXT_LINES = 3; private Paint paintTextIcon; private OsmandMapTileView view; + private boolean alwaysVisible; + public interface MapTextProvider { @@ -47,14 +49,22 @@ public class MapTextLayer extends OsmandMapLayer { } } + public boolean isAlwaysVisible() { + return alwaysVisible; + } + + public void setAlwaysVisible(boolean alwaysVisible) { + this.alwaysVisible = alwaysVisible; + } + public boolean isVisible() { - return view.getSettings().SHOW_POI_LABEL.get(); + return view.getSettings().SHOW_POI_LABEL.get() || isAlwaysVisible(); } @SuppressWarnings("unchecked") @Override public void onPrepareBufferImage(Canvas canvas, RotatedTileBox tileBox, DrawSettings settings) { - if (!view.getSettings().SHOW_POI_LABEL.get()) { + if (!isVisible()) { return; } TIntHashSet set = new TIntHashSet();