From c3e897587e2cd81d3cee69209efbadbeb7b4b308 Mon Sep 17 00:00:00 2001 From: Chumva Date: Thu, 1 Mar 2018 14:57:10 +0200 Subject: [PATCH] arrows moves by location and compass --- .../views/mapwidgets/MapMarkersWidgetsFactory.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/views/mapwidgets/MapMarkersWidgetsFactory.java b/OsmAnd/src/net/osmand/plus/views/mapwidgets/MapMarkersWidgetsFactory.java index 988ccde51c..42e3550bd8 100644 --- a/OsmAnd/src/net/osmand/plus/views/mapwidgets/MapMarkersWidgetsFactory.java +++ b/OsmAnd/src/net/osmand/plus/views/mapwidgets/MapMarkersWidgetsFactory.java @@ -188,19 +188,19 @@ public class MapMarkersWidgetsFactory { if (!map.getMyApplication().getSettings().USE_MAP_MARKERS.get()) { return; } + if (customLocation != null) { loc = customLocation; } else { Location l = map.getMyApplication().getLocationProvider().getLastStaleKnownLocation(); - boolean useCenterOfMap = !(map.getMapViewTrackingUtilities().isMapLinkedToLocation()); - if (useCenterOfMap) { - loc = map.getMapLocation(); - customLocation = loc; - } else if (l != null) { + if (l != null) { loc = new LatLon(l.getLatitude(), l.getLongitude()); } else { loc = null; } + if(!map.getMapViewTrackingUtilities().isMapLinkedToLocation()){ + customLocation = loc; + } } List markers = helper.getMapMarkers();