Merge pull request #8563 from osmandapp/8224_custom_PT_fix

fix custom routing for PT #8224
This commit is contained in:
vshcherb 2020-02-26 11:37:00 +01:00 committed by GitHub
commit 5b2bca4a7d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 8 deletions

View file

@ -77,12 +77,7 @@ public class TransportRoutingConfiguration {
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;