add check for calculateOsmAndRouteParts
This commit is contained in:
parent
ace42e3e34
commit
702d5fec5f
1 changed files with 3 additions and 1 deletions
|
@ -372,7 +372,9 @@ public class RouteProvider {
|
||||||
gpxRoute = new ArrayList<>();
|
gpxRoute = new ArrayList<>();
|
||||||
Location trackStart = routeLocations.get(0);
|
Location trackStart = routeLocations.get(0);
|
||||||
Location realStart = routeParams.start;
|
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());
|
LatLon nextRouteLocation = new LatLon(trackStart.getLatitude(), trackStart.getLongitude());
|
||||||
RouteCalculationResult newRes = findOfflineRouteSegment(routeParams, realStart, nextRouteLocation);
|
RouteCalculationResult newRes = findOfflineRouteSegment(routeParams, realStart, nextRouteLocation);
|
||||||
if (newRes != null && newRes.isCalculated()) {
|
if (newRes != null && newRes.isCalculated()) {
|
||||||
|
|
Loading…
Reference in a new issue