GPXTrack
public final class GPXTrack : GPXElement, Codable
Represents trkType of GPX v1.1 schema.
A track can hold track segments, along with additional information regarding the track.
Tracks are meant to show the start and finish of a journey, through the track segments that it holds.
-
Array of track segments. Must be included in every track.
Declaration
Swift
@available(*, deprecated, renamed: "segments") public var tracksegments: [GPXTrackSegment] { get } -
Array of track segments. Must be included in every track.
Declaration
Swift
public var segments: [GPXTrackSegment] -
Name of track.
Declaration
Swift
public var name: String? -
Additional comment of track.
Declaration
Swift
public var comment: String? -
A full description of the track. Can be of any length.
Declaration
Swift
public var desc: String? -
Source of track.
Declaration
Swift
public var source: String? -
GPS track number.
Declaration
Swift
public var number: Int? -
Type of current track.
Declaration
Swift
public var type: String? -
Custom Extensions of track, if needed.
Declaration
Swift
public var extensions: GPXExtensions? -
Default Initializer
Declaration
Swift
public required init() -
Initialize a new
GPXTrackSegementto the track.Method not recommended for use. Please initialize
GPXTrackSegmentmanually and adding it to the track instead.Declaration
Swift
public func newTrackSegment() -> GPXTrackSegment -
Adds a single track segment to the track.
Declaration
Swift
public func add(trackSegment: GPXTrackSegment?) -
Adds an array of track segments to the track.
Declaration
Swift
public func add(trackSegments: [GPXTrackSegment]) -
Removes a tracksegment from the track.
Declaration
Swift
public func remove(trackSegment: GPXTrackSegment) -
Initializes a new track point in track, then returns the new track point.
Declaration
Swift
public func newTrackPointWith(latitude: Double, longitude: Double) -> GPXTrackPoint
View on GitHub
GPXTrack Class Reference