Update progress
This commit is contained in:
parent
e7c19ac764
commit
dc14885f1f
2 changed files with 7 additions and 2 deletions
|
@ -43,4 +43,9 @@ public class RouteCalculationProgress {
|
|||
}
|
||||
return Math.min(progress * 100f, 99);
|
||||
}
|
||||
|
||||
public void nextIteration() {
|
||||
iteration++;
|
||||
totalEstimatedDistance = 0;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -176,7 +176,7 @@ public class RoutePlannerFrontEnd {
|
|||
if (routeDirection != null) {
|
||||
ctx.precalculatedRouteDirection = routeDirection.adopt(ctx);
|
||||
}
|
||||
ctx.calculationProgress.iteration++;
|
||||
ctx.calculationProgress.nextIteration();
|
||||
List<RouteSegmentResult> res = runNativeRouting(ctx, recalculationEnd);
|
||||
if (res != null) {
|
||||
new RouteResultPreparation().printResults(ctx, start, end, res);
|
||||
|
@ -199,7 +199,7 @@ public class RoutePlannerFrontEnd {
|
|||
if (!addSegment(end, ctx, indexNotFound++, points)) {
|
||||
return null;
|
||||
}
|
||||
ctx.calculationProgress.iteration++;
|
||||
ctx.calculationProgress.nextIteration();
|
||||
List<RouteSegmentResult> res = searchRoute(ctx, points, routeDirection);
|
||||
// make start and end more precise
|
||||
makeStartEndPointsPrecise(res, start, end, intermediates);
|
||||
|
|
Loading…
Reference in a new issue