This commit is contained in:
max-klaus 2020-05-04 16:31:06 +03:00
parent 69bdb9926a
commit 88bb70ad24

View file

@ -1205,9 +1205,11 @@ public class RouteCalculationResult {
int dist = listDistance[rp]; int dist = listDistance[rp];
Location l = locations.get(rp); Location l = locations.get(rp);
if(ap != null){ if(ap != null){
if (fromLoc != null) {
dist += fromLoc.distanceTo(ap); dist += fromLoc.distanceTo(ap);
}
dist += ap.distanceTo(l); dist += ap.distanceTo(l);
} else { } else if (fromLoc != null) {
dist += fromLoc.distanceTo(l); dist += fromLoc.distanceTo(l);
} }
return dist; return dist;