improve travel time display for GPX routes with calculated first segment
This commit is contained in:
parent
04ad452367
commit
2298e69031
1 changed files with 2 additions and 1 deletions
|
@ -569,7 +569,8 @@ public class RouteCalculationResult {
|
|||
if(Math.abs(diff) > 10) {
|
||||
type = diff > 0 ? TurnType.KL : TurnType.KR;
|
||||
}
|
||||
RouteDirectionInfo info = new RouteDirectionInfo(1, TurnType.valueOf(type, false));
|
||||
// AvgSpeed = 999999 for the last turn prevents the turn to have noticeable impact on travel time totalling if calculated route ends on a GPX route segment
|
||||
RouteDirectionInfo info = new RouteDirectionInfo(999999, TurnType.valueOf(type, false));
|
||||
info.distance = 0;
|
||||
info.afterLeftTime = 0;
|
||||
info.routePointOffset = locations.size() - 1;
|
||||
|
|
Loading…
Reference in a new issue