Skip to content

Commit

Permalink
fix for gpx with missing elevations
Browse files Browse the repository at this point in the history
  • Loading branch information
moovida committed Oct 28, 2024
1 parent 059ccda commit c587d8c
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions lib/com/hydrologis/flutterlibs/maps/layers/gpx.dart
Original file line number Diff line number Diff line change
Expand Up @@ -257,10 +257,12 @@ class GpxSource extends VectorLayerSource implements SldLayerSource {
if (_colorTable.isValid() &&
_tracksRoutes.isNotEmpty &&
_tracksRoutes[0].isNotEmpty &&
_tracksRoutes[0][0] is LatLngExt) {
_tracksRoutes[0][0] is LatLngExt &&
minLineElev.isFinite &&
maxLineElev.isFinite) {
_tracksRoutes.forEach((linePoints) {
lines = EnhancedColorUtility.buildPolylines(lines, linePoints,
_colorTable, lineStyle!.strokeWidth, minLineElev, maxLineElev);
EnhancedColorUtility.buildPolylines(lines, linePoints, _colorTable,
lineStyle!.strokeWidth, minLineElev, maxLineElev);
});
} else {
_tracksRoutes.forEach((linePoints) {
Expand Down

0 comments on commit c587d8c

Please sign in to comment.