GPXDocument (API Reference)
Package com.here.sdk.navigation
Class GPXDocument
java.lang.Object
com.here.NativeBase
com.here.sdk.navigation.GPXDocument
Use the GPXDocument to load the GPX file. Only track data is used from the GPX file format (see trkType at https://www.topografix.com/GPX/1/1/#type_trkType). Any unknown elements in the file are ignored. Any known element with an invalid value returns an error. Elevation values are ignored.
-
Constructor Summary
ConstructorsConstructorDescriptionGPXDocument(String gpxFilePath, GPXOptions options) Create a GPX document from a file.GPXDocument(List<GPXTrack> tracks) Create a GPX document from a list of GPX tracks. -
Method Summary
Modifier and TypeMethodDescriptionvoidAdd track to GPX document.static GPXDocumentfromString(String content, GPXOptions options) Create a GPX document from a string.Gets the tracks stored in this GPX document.booleanSaves the document to a file.
-
Constructor Details
-
GPXDocument
Create a GPX document from a list of GPX tracks.
- Parameters:
tracks-The list of tracks.
-
Method Details
-
save
Saves the document to a file. For saving the
getTracks()modification before writing to a file, useGPXTrackWriter.- Parameters:
gpxFilePath-The file path where the GPX document will be saved.
- Returns:
Trueif the document has been saved successfully.Falseif an error has been happened during saving.
-
getTracks
Gets the tracks stored in this GPX document.
- Returns:
The tracks stored in this GPX document.