gpx
2.5.0, released 4 months ago by kb-apps.com
Load, manipulate, and save GPS data in GPX format.
WASM-ready
What it does
A Dart library for parsing and generating GPX files containing waypoints, routes, and tracks. It also supports exporting GPX data to KML format and includes typed models for Garmin extensions.
AI-written summary of version 2.5.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need to parse or generate GPX files in a Dart or Flutter application
- You need to export GPS data to KML format for Google Earth
- You need typed access to Garmin GpxExtensions
Skip it when
- You need GPX 1.0 support
- You need to read or write directly from files instead of strings
- You require schema validation
Strengths
- Easy to use reader and writer for GPX data
- Supports KML export
- Includes typed Garmin extension support
- Compatibility modes for strict GPX parsers
Weaknesses
- No support for GPX 1.0
- Reads and writes exclusively from/to strings rather than streams or files directly
- Does not validate schema declarations
Setup
- Kind
- Pure Dart
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 2
import 'package:gpx/gpx.dart';
void main() {
final xmlGpx = GpxReader().fromString('<?xml version="1.0" encoding="UTF-8"?>' \
'<gpx version="1.1" creator="dart-gpx library">' \
'<wpt lat="-25.7996" lon="-62.8666"><ele>10.0</ele><name>Monte Quemado</name><desc>Argentina</desc></wpt>' \
'</gpx>');
print(xmlGpx);
print(xmlGpx.wpts);
}Alternatives
Packages that do the same job and could replace gpx.
Works with
Packages commonly used together with gpx: ones it builds on, ones built on it, and its own family.