Moving navigation finish finalized.
This commit is contained in:
parent
ee59a69115
commit
a7fd0a832c
2 changed files with 3 additions and 7 deletions
|
@ -89,10 +89,6 @@ public class TargetPointsHelper {
|
|||
return null;
|
||||
}
|
||||
|
||||
public void setLocation(LatLon location) {
|
||||
point = location;
|
||||
}
|
||||
|
||||
public double getLatitude() {
|
||||
return point.getLatitude();
|
||||
}
|
||||
|
|
|
@ -260,7 +260,8 @@ public class PointNavigationLayer extends OsmandMapLayer implements
|
|||
|
||||
@Override
|
||||
public boolean isObjectMovable(Object o) {
|
||||
return o instanceof TargetPoint;
|
||||
TargetPointsHelper targetPoints = map.getMyApplication().getTargetPointsHelper();
|
||||
return o == targetPoints.getPointToNavigate();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -270,8 +271,7 @@ public class PointNavigationLayer extends OsmandMapLayer implements
|
|||
if (o instanceof TargetPoint) {
|
||||
TargetPoint point = (TargetPoint) o;
|
||||
TargetPointsHelper tph = map.getMyApplication().getTargetPointsHelper();
|
||||
tph.removeWayPoint(false, point.index);
|
||||
tph.navigateToPoint(position, true, point.index, point.getPointDescription(map));
|
||||
tph.navigateToPoint(position, true, -1, point.getPointDescription(map));
|
||||
result = true;
|
||||
}
|
||||
if (callback != null) {
|
||||
|
|
Loading…
Reference in a new issue