Fix Issue 643: stop routing doens't clear navigation point

This commit is contained in:
Victor Shcherb 2011-09-18 14:41:29 +02:00
parent a3577aa171
commit 13a7e98f6a

View file

@ -1027,7 +1027,11 @@ public class MapActivity extends Activity implements IMapLocationListener, Senso
return true;
case R.id.map_navigate_to_point:
if (mapLayers.getNavigationLayer().getPointToNavigate() != null) {
if(routingHelper.isRouteCalculated()){
routingHelper.setFinalAndCurrentLocation(null, routingHelper.getCurrentLocation(), routingHelper.getCurrentGPXRoute());
} else {
navigateToPoint(null);
}
} else {
navigateToPoint(new LatLon(mapView.getLatitude(), mapView.getLongitude()));
}