Fix gpx routing without route

This commit is contained in:
max-klaus 2020-07-27 11:15:20 +03:00
parent 5db44756cc
commit 2b0f47d3a7

View file

@ -253,10 +253,10 @@ public class RouteProvider {
} }
if (OSMAND_ROUTER_V2.equals(file.author)) { if (OSMAND_ROUTER_V2.equals(file.author)) {
route = parseOsmAndGPXRoute(points, file); route = parseOsmAndGPXRoute(points, file);
addMissingTurns = false; addMissingTurns = route.isEmpty();
} else if (file.isCloudmadeRouteFile() || OSMAND_ROUTER.equals(file.author)) { } else if (file.isCloudmadeRouteFile() || OSMAND_ROUTER.equals(file.author)) {
directions = parseOsmAndGPXRoute(points, file, OSMAND_ROUTER.equals(file.author), builder.leftSide, 10); directions = parseOsmAndGPXRoute(points, file, OSMAND_ROUTER.equals(file.author), builder.leftSide, 10);
if (OSMAND_ROUTER.equals(file.author)) { if (OSMAND_ROUTER.equals(file.author) && file.hasRtePt()) {
// For files generated by OSMAND_ROUTER use directions contained unaltered // For files generated by OSMAND_ROUTER use directions contained unaltered
addMissingTurns = false; addMissingTurns = false;
} }