arrows moves by location and compass

This commit is contained in:
Chumva 2018-03-01 14:57:10 +02:00
parent 05c33574b4
commit c3e897587e

View file

@ -188,19 +188,19 @@ public class MapMarkersWidgetsFactory {
if (!map.getMyApplication().getSettings().USE_MAP_MARKERS.get()) { if (!map.getMyApplication().getSettings().USE_MAP_MARKERS.get()) {
return; return;
} }
if (customLocation != null) { if (customLocation != null) {
loc = customLocation; loc = customLocation;
} else { } else {
Location l = map.getMyApplication().getLocationProvider().getLastStaleKnownLocation(); Location l = map.getMyApplication().getLocationProvider().getLastStaleKnownLocation();
boolean useCenterOfMap = !(map.getMapViewTrackingUtilities().isMapLinkedToLocation()); if (l != null) {
if (useCenterOfMap) {
loc = map.getMapLocation();
customLocation = loc;
} else if (l != null) {
loc = new LatLon(l.getLatitude(), l.getLongitude()); loc = new LatLon(l.getLatitude(), l.getLongitude());
} else { } else {
loc = null; loc = null;
} }
if(!map.getMapViewTrackingUtilities().isMapLinkedToLocation()){
customLocation = loc;
}
} }
List<MapMarker> markers = helper.getMapMarkers(); List<MapMarker> markers = helper.getMapMarkers();