Do not keep finish point when sorting door to door in "Plan route"

This commit is contained in:
Alexander Sytnyk 2018-03-07 19:00:48 +02:00
parent 46c24c68bb
commit 6324ba56aa

View file

@ -903,9 +903,8 @@ public class PlanRouteFragment extends BaseOsmAndFragment implements OsmAndLocat
List<LatLon> selectedLatLon = markersHelper.getSelectedMarkersLatLon(); List<LatLon> selectedLatLon = markersHelper.getSelectedMarkersLatLon();
LatLon start = startFromLoc ? new LatLon(myLoc.getLatitude(), myLoc.getLongitude()) : selectedLatLon.remove(0); LatLon start = startFromLoc ? new LatLon(myLoc.getLatitude(), myLoc.getLongitude()) : selectedLatLon.remove(0);
LatLon end = selectedLatLon.remove(selectedLatLon.size() - 1);
int[] sequence = new TspAnt().readGraph(selectedLatLon, start, end).solve(); int[] sequence = new TspAnt().readGraph(selectedLatLon, start, null).solve();
List<MapMarker> res = new ArrayList<>(); List<MapMarker> res = new ArrayList<>();
for (int i = 0; i < sequence.length; i++) { for (int i = 0; i < sequence.length; i++) {