forked from upstream-mirrors/OpenTracks
Bug fix, fix importing markers
This commit is contained in:
+10
@@ -256,6 +256,14 @@ abstract class AbstractFileTrackImporter extends DefaultHandler implements Track
|
|||||||
waypoint = null;
|
waypoint = null;
|
||||||
} else {
|
} else {
|
||||||
// The waypoint location time matches the track point time
|
// The waypoint location time matches the track point time
|
||||||
|
|
||||||
|
if (!LocationUtils.isValidLocation(location)) {
|
||||||
|
// Invalid location, load the next location
|
||||||
|
location = null;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Valid location
|
||||||
if (location.getLatitude() == waypoint.getLocation().getLatitude()
|
if (location.getLatitude() == waypoint.getLocation().getLatitude()
|
||||||
&& location.getLongitude() == waypoint.getLocation().getLongitude()) {
|
&& location.getLongitude() == waypoint.getLocation().getLongitude()) {
|
||||||
|
|
||||||
@@ -285,6 +293,8 @@ abstract class AbstractFileTrackImporter extends DefaultHandler implements Track
|
|||||||
-1L, -1L, location, tripStatistics, waypoint.getPhotoUrl());
|
-1L, -1L, location, tripStatistics, waypoint.getPhotoUrl());
|
||||||
myTracksProviderUtils.insertWaypoint(newWaypoint);
|
myTracksProviderUtils.insertWaypoint(newWaypoint);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Load the next waypoint
|
||||||
waypoint = null;
|
waypoint = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user