Merge pull request #11415 from osmandapp/track_line_fixes

Fix for general segments and segments with one point
This commit is contained in:
Vitaliy 2021-04-13 13:59:43 +03:00 committed by GitHub
commit 20df6ec98f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -106,6 +106,10 @@ public class RouteColorize {
} }
for (Track t : gpxFile.tracks) { for (Track t : gpxFile.tracks) {
for (TrkSegment ts : t.segments) { for (TrkSegment ts : t.segments) {
if (ts.generalSegment || ts.points.size() < 2) {
continue;
}
for (WptPt p : ts.points) { for (WptPt p : ts.points) {
latList.add(p.lat); latList.add(p.lat);
lonList.add(p.lon); lonList.add(p.lon);