Merge remote-tracking branch 'origin/master'

This commit is contained in:
Weblate 2016-02-16 08:47:57 +01:00
commit 76eeb5d7a2
3 changed files with 7 additions and 5 deletions

View file

@ -146,10 +146,8 @@ public class MapActivityLayers {
navigationLayer = new PointNavigationLayer(activity);
mapView.addLayer(navigationLayer, 7);
// 7.3 map markers layer
if (app.getSettings().USE_MAP_MARKERS.get()) {
mapMarkersLayer = new MapMarkersLayer(activity);
mapView.addLayer(mapMarkersLayer, 7.3f);
}
mapMarkersLayer = new MapMarkersLayer(activity);
mapView.addLayer(mapMarkersLayer, 7.3f);
// 7.5 Impassible roads
impassableRoadsLayer = new ImpassableRoadsLayer(activity);
mapView.addLayer(impassableRoadsLayer, 7.5f);

View file

@ -140,7 +140,7 @@ public class MapMarkersLayer extends OsmandMapLayer implements ContextMenuLayer.
widget.updateInfo(tb.getZoom());
if (tb.getZoom() < 3) {
if (tb.getZoom() < 3 || !map.getMyApplication().getSettings().USE_MAP_MARKERS.get()) {
return;
}

View file

@ -162,6 +162,10 @@ public class MapMarkersWidget {
}
public void updateInfo(int zoom) {
if (!map.getMyApplication().getSettings().USE_MAP_MARKERS.get()) {
return;
}
List<MapMarker> markers = helper.getActiveMapMarkers();
if (zoom < 3 || markers.size() == 0 || map.getMyApplication().getRoutingHelper().isFollowingMode()
|| map.getMyApplication().getRoutingHelper().isRoutePlanningMode()