From 9615e255eab35ab7db1b039a1b12a1ff2709de0c Mon Sep 17 00:00:00 2001 From: Chumva Date: Thu, 1 Mar 2018 14:23:02 +0200 Subject: [PATCH] added centerOfMap for arrow --- .../plus/views/mapwidgets/MapMarkersWidgetsFactory.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/views/mapwidgets/MapMarkersWidgetsFactory.java b/OsmAnd/src/net/osmand/plus/views/mapwidgets/MapMarkersWidgetsFactory.java index 36247023e5..17fa40c927 100644 --- a/OsmAnd/src/net/osmand/plus/views/mapwidgets/MapMarkersWidgetsFactory.java +++ b/OsmAnd/src/net/osmand/plus/views/mapwidgets/MapMarkersWidgetsFactory.java @@ -188,15 +188,16 @@ public class MapMarkersWidgetsFactory { if (!map.getMyApplication().getSettings().USE_MAP_MARKERS.get()) { return; } - if (customLocation != null) { loc = customLocation; } else { Location l = map.getMyApplication().getLocationProvider().getLastStaleKnownLocation(); - if (l != null) { - loc = new LatLon(l.getLatitude(), l.getLongitude()); - } else { + boolean useCenterOfMap = !(map.getMapViewTrackingUtilities().isMapLinkedToLocation()); + if (useCenterOfMap) { loc = map.getMapLocation(); + customLocation = loc; + } else if (l != null) { + loc = new LatLon(l.getLatitude(), l.getLongitude()); } }