From 48673682969c40ed3359cedcef1a11d0b875bf48 Mon Sep 17 00:00:00 2001 From: afischerdev Date: Sun, 15 Jan 2023 17:43:51 +0100 Subject: [PATCH] move process voice hint, speed profile to the end --- .../src/main/java/btools/router/RoutingEngine.java | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/brouter-core/src/main/java/btools/router/RoutingEngine.java b/brouter-core/src/main/java/btools/router/RoutingEngine.java index 77b9eac..34f511c 100644 --- a/brouter-core/src/main/java/btools/router/RoutingEngine.java +++ b/brouter-core/src/main/java/btools/router/RoutingEngine.java @@ -378,13 +378,17 @@ public class RoutingEngine extends Thread { if (routingContext.correctMisplacedViaPoints && !matchedWaypoints.get(i).direct) { changed = snappPathConnection(totaltrack, seg, routingContext.inverseRouting ? matchedWaypoints.get(i + 1) : matchedWaypoints.get(i)); } -// if (wptIndex > 0) -// matchedWaypoints.get(wptIndex).indexInTrack = totaltrack.nodes.size() - 1; totaltrack.appendTrack(seg); lastTracks[i] = seg; } - if (routingContext.poipoints != null) totaltrack.pois = routingContext.poipoints; + + totaltrack.matchedWaypoints = matchedWaypoints; + totaltrack.processVoiceHints(routingContext); + totaltrack.prepareSpeedProfile(routingContext); + + if (routingContext.poipoints != null) + totaltrack.pois = routingContext.poipoints; totaltrack.matchedWaypoints = matchedWaypoints; return totaltrack; } @@ -1214,8 +1218,6 @@ public class RoutingEngine extends Thread { // for final track.. if (guideTrack != null) { track.copyDetours(guideTrack); - track.processVoiceHints(routingContext); - track.prepareSpeedProfile(routingContext); } return track; }