From 702d5fec5f18040bec1598c6752ee48ed893a276 Mon Sep 17 00:00:00 2001 From: Chumva Date: Tue, 24 Jul 2018 14:44:43 +0300 Subject: [PATCH] add check for calculateOsmAndRouteParts --- OsmAnd/src/net/osmand/plus/routing/RouteProvider.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/OsmAnd/src/net/osmand/plus/routing/RouteProvider.java b/OsmAnd/src/net/osmand/plus/routing/RouteProvider.java index b9142af8f1..1aaa5f52f4 100644 --- a/OsmAnd/src/net/osmand/plus/routing/RouteProvider.java +++ b/OsmAnd/src/net/osmand/plus/routing/RouteProvider.java @@ -372,7 +372,9 @@ public class RouteProvider { gpxRoute = new ArrayList<>(); Location trackStart = routeLocations.get(0); Location realStart = routeParams.start; - if (realStart != null && trackStart != null && realStart.distanceTo(trackStart) > 60) { + if (realStart != null && trackStart != null + && realStart.distanceTo(trackStart) > 60 + && !gpxParams.calculateOsmAndRouteParts) { LatLon nextRouteLocation = new LatLon(trackStart.getLatitude(), trackStart.getLongitude()); RouteCalculationResult newRes = findOfflineRouteSegment(routeParams, realStart, nextRouteLocation); if (newRes != null && newRes.isCalculated()) {