RouteFormatConverter class final

Converts route content between GeoJSON, GPX, and KML.

Conversion is performed in memory and does not read or write files. Route parts are retained as separate line/track segments. Elevation and timestamps are preserved when the source format supplies them.

Constructors

RouteFormatConverter()
const

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

convert({required String contents, required TrackExportFormat sourceFormat, required TrackExportFormat targetFormat}) String
Converts contents from sourceFormat to targetFormat.
geoJsonToGpx(String contents) String
Converts GeoJSON route content to GPX.
geoJsonToKml(String contents) String
Converts GeoJSON route content to KML.
gpxToGeoJson(String contents) String
Converts GPX route content to GeoJSON.
gpxToKml(String contents) String
Converts GPX route content to KML.
kmlToGeoJson(String contents) String
Converts KML route content to GeoJSON.
kmlToGpx(String contents) String
Converts KML route content to GPX.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited