diff --git a/OsmAnd-java/src/main/java/net/osmand/router/RoutePlannerFrontEnd.java b/OsmAnd-java/src/main/java/net/osmand/router/RoutePlannerFrontEnd.java index 74dceb13a1..4fb6c9a193 100644 --- a/OsmAnd-java/src/main/java/net/osmand/router/RoutePlannerFrontEnd.java +++ b/OsmAnd-java/src/main/java/net/osmand/router/RoutePlannerFrontEnd.java @@ -6,7 +6,6 @@ import net.osmand.NativeLibrary; import net.osmand.PlatformUtil; import net.osmand.ResultMatcher; import net.osmand.binary.BinaryMapIndexReader; -import net.osmand.binary.BinaryMapRouteReaderAdapter; import net.osmand.binary.BinaryMapRouteReaderAdapter.RouteRegion; import net.osmand.binary.RouteDataObject; import net.osmand.data.LatLon; @@ -689,15 +688,15 @@ public class RoutePlannerFrontEnd { } } if (ctx.calculationMode == RouteCalculationMode.COMPLEX && routeDirection == null - && maxDistance > ctx.config.DEVIATION_RADIUS * 6) { + && maxDistance > RoutingConfiguration.DEVIATION_RADIUS * 6) { ctx.calculationProgress.totalIterations++; RoutingContext nctx = buildRoutingContext(ctx.config, ctx.nativeLib, ctx.getMaps(), RouteCalculationMode.BASE); nctx.calculationProgress = ctx.calculationProgress; List ls = searchRoute(nctx, start, end, intermediates); - if(ls == null) { + if (ls == null) { return null; } - routeDirection = PrecalculatedRouteDirection.build(ls, ctx.config.DEVIATION_RADIUS, ctx.getRouter().getMaxSpeed()); + routeDirection = PrecalculatedRouteDirection.build(ls, RoutingConfiguration.DEVIATION_RADIUS, ctx.getRouter().getMaxSpeed()); } List res ; if (intermediatesEmpty && ctx.nativeLib != null) { diff --git a/OsmAnd-java/src/main/java/net/osmand/router/RoutingConfiguration.java b/OsmAnd-java/src/main/java/net/osmand/router/RoutingConfiguration.java index 232b971f9f..829e061494 100644 --- a/OsmAnd-java/src/main/java/net/osmand/router/RoutingConfiguration.java +++ b/OsmAnd-java/src/main/java/net/osmand/router/RoutingConfiguration.java @@ -20,7 +20,7 @@ import java.util.Stack; public class RoutingConfiguration { public static final int DEFAULT_MEMORY_LIMIT = 30; - public final float DEVIATION_RADIUS = 3000; + public static final float DEVIATION_RADIUS = 3000; public Map attributes = new LinkedHashMap(); // 1. parameters of routing and different tweaks