Moving navigation finish finalized.

This commit is contained in:
GaidamakUA 2016-05-16 16:46:45 +03:00
parent ee59a69115
commit a7fd0a832c
2 changed files with 3 additions and 7 deletions

View file

@ -89,10 +89,6 @@ public class TargetPointsHelper {
return null;
}
public void setLocation(LatLon location) {
point = location;
}
public double getLatitude() {
return point.getLatitude();
}

View file

@ -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) {