diff --git a/OsmAnd-java/src/main/java/net/osmand/router/TransportRoutingConfiguration.java b/OsmAnd-java/src/main/java/net/osmand/router/TransportRoutingConfiguration.java index 6a0bf5cd1c..2f0eaf8b3e 100644 --- a/OsmAnd-java/src/main/java/net/osmand/router/TransportRoutingConfiguration.java +++ b/OsmAnd-java/src/main/java/net/osmand/router/TransportRoutingConfiguration.java @@ -76,13 +76,8 @@ public class TransportRoutingConfiguration { public int getBoardingTime() { return boardingTime; } - - public TransportRoutingConfiguration(RoutingConfiguration.Builder builder) { - this(builder, new TreeMap()); - } - - public TransportRoutingConfiguration(RoutingConfiguration.Builder builder, Map params) { - GeneralRouter prouter = builder == null ? null : builder.getRouter("public_transport"); + + public TransportRoutingConfiguration(GeneralRouter prouter, Map params) { if(prouter != null) { this.router = prouter.build(params); walkRadius = router.getIntAttribute("walkRadius", walkRadius); diff --git a/OsmAnd/src/net/osmand/plus/routing/TransportRoutingHelper.java b/OsmAnd/src/net/osmand/plus/routing/TransportRoutingHelper.java index c1d4616cb9..29cf079cd5 100644 --- a/OsmAnd/src/net/osmand/plus/routing/TransportRoutingHelper.java +++ b/OsmAnd/src/net/osmand/plus/routing/TransportRoutingHelper.java @@ -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;