Skip to content

Commit

Permalink
Merge branch 'polygon'
Browse files Browse the repository at this point in the history
  • Loading branch information
sun-jiao committed Mar 8, 2024
2 parents 159a641 + dcfa28a commit 75c8477
Show file tree
Hide file tree
Showing 15 changed files with 738 additions and 25 deletions.
1 change: 1 addition & 0 deletions lib/geoxml.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ export 'src/kml_writer.dart';
export 'src/model/bounds.dart';
export 'src/model/copyright.dart';
export 'src/model/email.dart';
export 'src/model/geo_style.dart';
export 'src/model/geoxml.dart';
export 'src/model/link.dart';
export 'src/model/metadata.dart';
Expand Down
7 changes: 5 additions & 2 deletions lib/src/gpx_reader.dart
Original file line number Diff line number Diff line change
Expand Up @@ -454,8 +454,11 @@ class GpxReader {
final elm = iterator.current;

if (elm is XmlStartElementEvent) {
link.href =
elm.attributes.firstWhere((attr) => attr.name == GpxTag.href).value;
final hrefs = elm.attributes.where((attr) => attr.name == GpxTag.href);

if (hrefs.isNotEmpty) {
link.href = hrefs.first.value;
}
}

if ((elm is XmlStartElementEvent) && !elm.isSelfClosing) {
Expand Down
Loading

0 comments on commit 75c8477

Please sign in to comment.