Fix #5354
This commit is contained in:
parent
19063045e5
commit
67eb2d1ac9
1 changed files with 4 additions and 5 deletions
|
@ -57,7 +57,6 @@ import net.osmand.router.RouteResultPreparation;
|
||||||
import net.osmand.router.TurnType;
|
import net.osmand.router.TurnType;
|
||||||
import net.osmand.util.Algorithms;
|
import net.osmand.util.Algorithms;
|
||||||
|
|
||||||
import java.text.DecimalFormat;
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
@ -642,9 +641,9 @@ public class RouteInfoWidgetsFactory {
|
||||||
private int cachedDegrees;
|
private int cachedDegrees;
|
||||||
private float MIN_SPEED_FOR_HEADING = 1f;
|
private float MIN_SPEED_FOR_HEADING = 1f;
|
||||||
|
|
||||||
public LatLon getPointToNavigate() {
|
private LatLon getNextTargetPoint() {
|
||||||
TargetPoint p = map.getPointToNavigate();
|
List<TargetPoint> points = getOsmandApplication().getTargetPointsHelper().getIntermediatePointsWithTarget();
|
||||||
return p == null ? null : p.point;
|
return points.isEmpty() ? null : points.get(0).point;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -668,7 +667,7 @@ public class RouteInfoWidgetsFactory {
|
||||||
public int getBearing(boolean relative) {
|
public int getBearing(boolean relative) {
|
||||||
int d = -1000;
|
int d = -1000;
|
||||||
Location myLocation = getOsmandApplication().getLocationProvider().getLastKnownLocation();
|
Location myLocation = getOsmandApplication().getLocationProvider().getLastKnownLocation();
|
||||||
LatLon l = getPointToNavigate();
|
LatLon l = getNextTargetPoint();
|
||||||
if (l == null) {
|
if (l == null) {
|
||||||
List<MapMarker> markers = getOsmandApplication().getMapMarkersHelper().getMapMarkers();
|
List<MapMarker> markers = getOsmandApplication().getMapMarkersHelper().getMapMarkers();
|
||||||
if (markers.size() > 0) {
|
if (markers.size() > 0) {
|
||||||
|
|
Loading…
Reference in a new issue