Merge pull request #5081 from osmandapp/TopbarArrowIconMarkers
fixed bug with marker arrow icon rotation
This commit is contained in:
commit
a4cd72192d
2 changed files with 5 additions and 7 deletions
|
@ -314,9 +314,7 @@ public class MapMarkersLayer extends OsmandMapLayer implements IContextMenuProvi
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onDraw(Canvas canvas, RotatedTileBox tileBox, DrawSettings nightMode) {
|
public void onDraw(Canvas canvas, RotatedTileBox tileBox, DrawSettings nightMode) {
|
||||||
Location myLoc = map.getMyApplication().getLocationProvider().getLastStaleKnownLocation();
|
widgetsFactory.updateInfo(useFingerLocation ? fingerLocation : null, tileBox.getZoom());
|
||||||
widgetsFactory.updateInfo(useFingerLocation ? fingerLocation : (myLoc == null
|
|
||||||
? tileBox.getCenterLatLon() : new LatLon(myLoc.getLatitude(), myLoc.getLongitude())), tileBox.getZoom());
|
|
||||||
OsmandSettings settings = map.getMyApplication().getSettings();
|
OsmandSettings settings = map.getMyApplication().getSettings();
|
||||||
|
|
||||||
if (tileBox.getZoom() < 3 || !settings.USE_MAP_MARKERS.get()) {
|
if (tileBox.getZoom() < 3 || !settings.USE_MAP_MARKERS.get()) {
|
||||||
|
|
|
@ -192,11 +192,11 @@ public class MapMarkersWidgetsFactory {
|
||||||
if (customLocation != null) {
|
if (customLocation != null) {
|
||||||
loc = customLocation;
|
loc = customLocation;
|
||||||
} else {
|
} else {
|
||||||
Location l = map.getMapViewTrackingUtilities().getMyLocation();
|
Location l = map.getMyApplication().getLocationProvider().getLastStaleKnownLocation();
|
||||||
if (l != null) {
|
if (l != null) {
|
||||||
loc = new LatLon(l.getLatitude(), l.getLongitude());
|
loc = new LatLon(l.getLatitude(), l.getLongitude());
|
||||||
} else {
|
} else {
|
||||||
loc = null;
|
loc = map.getMapLocation();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -215,8 +215,8 @@ public class MapMarkersWidgetsFactory {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
Float heading = map.getMapViewTrackingUtilities().getHeading();
|
boolean mapLinkedToLoc = map.getMapViewTrackingUtilities().isMapLinkedToLocation();
|
||||||
|
Float heading = !mapLinkedToLoc ? 0f : map.getMapViewTrackingUtilities().getHeading();
|
||||||
MapMarker marker = markers.get(0);
|
MapMarker marker = markers.get(0);
|
||||||
updateUI(loc, heading, marker, arrowImg, distText, okButton, addressText, true, customLocation != null);
|
updateUI(loc, heading, marker, arrowImg, distText, okButton, addressText, true, customLocation != null);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue