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

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

View file

@ -471,7 +471,8 @@ public class TransportRoutingHelper {
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();
TransportRoutingContext ctx = new TransportRoutingContext(cfg, files);
ctx.calculationProgress = params.calculationProgress;