GPXExporter
public final class GPXExporter
A class for exporting a GPXTrack
to an xml string.
-
Initializes a GPXExporter
If the track cannot be exported, the resulting
xmlString
property of the exporter is an empty GPX track xml.Declaration
Swift
public init(track: GPXTrack, shouldExportDate: Bool = true, creatorName: String = "GPXKit")
Parameters
track
The
GPXTrack
to export.shouldExportDate
Flag indicating whether it should export the timestamps in the track. Set it to false if you want to omit the values. This would decrease the exported xml’s file size and protects privacy. Defaults to true.
creatorName
The value for the creator tag in the header. Defaults to GPXKit
-
The exported GPX xml string. If the track cannot be exported, its value is an empty GPX track xml.
Declaration
Swift
public var xmlString: String { get }