fix custom routing for PT #8224

This commit is contained in:
MadWasp79 2020-02-25 18:30:39 +02:00
parent e6613ddb12
commit 9790a408c6
2 changed files with 4 additions and 8 deletions

View file

@ -77,12 +77,7 @@ public class TransportRoutingConfiguration {
return boardingTime; return boardingTime;
} }
public TransportRoutingConfiguration(RoutingConfiguration.Builder builder) { public TransportRoutingConfiguration(GeneralRouter prouter, Map<String, String> params) {
this(builder, new TreeMap<String, String>());
}
public TransportRoutingConfiguration(RoutingConfiguration.Builder builder, Map<String, String> params) {
GeneralRouter prouter = builder == null ? null : builder.getRouter("public_transport");
if(prouter != null) { if(prouter != null) {
this.router = prouter.build(params); this.router = prouter.build(params);
walkRadius = router.getIntAttribute("walkRadius", walkRadius); walkRadius = router.getIntAttribute("walkRadius", walkRadius);

View file

@ -471,7 +471,8 @@ public class TransportRoutingHelper {
params.params.put(key, vl); params.params.put(key, vl);
} }
} }
TransportRoutingConfiguration cfg = new TransportRoutingConfiguration(config, params.params); GeneralRouter prouter = config.getRouter(params.mode.getRoutingProfile());
TransportRoutingConfiguration cfg = new TransportRoutingConfiguration(prouter, params.params);
TransportRoutePlanner planner = new TransportRoutePlanner(); TransportRoutePlanner planner = new TransportRoutePlanner();
TransportRoutingContext ctx = new TransportRoutingContext(cfg, files); TransportRoutingContext ctx = new TransportRoutingContext(cfg, files);
ctx.calculationProgress = params.calculationProgress; ctx.calculationProgress = params.calculationProgress;