Skip to content

Commit db45637

Browse files
authored
Merge pull request #103 from GIScience/fix-ors-1976
fix: pass extra_info when quering round_trip
2 parents 4af1252 + df9eddb commit db45637

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

core/src/main/java/com/graphhopper/routing/Router.java

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,8 +219,15 @@ protected GHResponse routeRoundTrip(GHRequest request, FlexSolver solver) {
219219
RoundTripRouting.Result result = RoundTripRouting.calcPaths(snaps, pathCalculator);
220220
// we merge the different legs of the roundtrip into one response path
221221
ResponsePath responsePath = concatenatePaths(request, solver.weighting, queryGraph, result.paths, getWaypoints(snaps));
222-
ghRsp.add(responsePath);
222+
223223
// ORS-GH MOD START - pass graph date
224+
if (request.getEncoderName() != null && !request.getEncoderName().isEmpty()) {
225+
PathProcessor pathProcessor = pathProcessorFactory.createPathProcessor(request.getAdditionalHints(), encodingManager.getEncoder(request.getEncoderName()), ghStorage);
226+
responsePath = concatenatePaths(request, solver.weighting, queryGraph, result.paths, getWaypoints(snaps), pathProcessor);
227+
ghRsp.addReturnObject(pathProcessor);
228+
}
229+
ghRsp.add(responsePath);
230+
224231
String date = ghStorage.getProperties().get("datareader.import.date");
225232
if (Helper.isEmpty(date)) {
226233
date = ghStorage.getProperties().get("datareader.data.date");

0 commit comments

Comments
 (0)