From d14b2477fcc08d94ffea63ac60cb5869821b5721 Mon Sep 17 00:00:00 2001 From: Chumva Date: Thu, 1 Mar 2018 13:16:31 +0200 Subject: [PATCH] changed customLocation to be only fingerLocation --- OsmAnd/src/net/osmand/plus/views/MapMarkersLayer.java | 4 +--- .../plus/views/mapwidgets/MapMarkersWidgetsFactory.java | 4 ++-- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/views/MapMarkersLayer.java b/OsmAnd/src/net/osmand/plus/views/MapMarkersLayer.java index 8a3471be2d..f99225907a 100644 --- a/OsmAnd/src/net/osmand/plus/views/MapMarkersLayer.java +++ b/OsmAnd/src/net/osmand/plus/views/MapMarkersLayer.java @@ -314,9 +314,7 @@ public class MapMarkersLayer extends OsmandMapLayer implements IContextMenuProvi @Override public void onDraw(Canvas canvas, RotatedTileBox tileBox, DrawSettings nightMode) { - Location myLoc = map.getMyApplication().getLocationProvider().getLastStaleKnownLocation(); - widgetsFactory.updateInfo(useFingerLocation ? fingerLocation : (myLoc == null - ? tileBox.getCenterLatLon() : new LatLon(myLoc.getLatitude(), myLoc.getLongitude())), tileBox.getZoom()); + widgetsFactory.updateInfo(useFingerLocation ? fingerLocation : null, tileBox.getZoom()); OsmandSettings settings = map.getMyApplication().getSettings(); if (tileBox.getZoom() < 3 || !settings.USE_MAP_MARKERS.get()) { diff --git a/OsmAnd/src/net/osmand/plus/views/mapwidgets/MapMarkersWidgetsFactory.java b/OsmAnd/src/net/osmand/plus/views/mapwidgets/MapMarkersWidgetsFactory.java index 29eea481d5..bdcdf93342 100644 --- a/OsmAnd/src/net/osmand/plus/views/mapwidgets/MapMarkersWidgetsFactory.java +++ b/OsmAnd/src/net/osmand/plus/views/mapwidgets/MapMarkersWidgetsFactory.java @@ -192,11 +192,11 @@ public class MapMarkersWidgetsFactory { if (customLocation != null) { loc = customLocation; } else { - Location l = map.getMapViewTrackingUtilities().getMyLocation(); + Location l = map.getMyApplication().getLocationProvider().getLastStaleKnownLocation(); if (l != null) { loc = new LatLon(l.getLatitude(), l.getLongitude()); } else { - loc = null; + loc = map.getMapLocation(); } }