HorizonPath
public struct HorizonPath : Equatable
Path in the horizon.
The length of the path as well as which types of horizon elements HorizonElement it
contains are determined by the set of horizon options HorizonOptions for which
horizon data was generated. For information on how to manage horizon options see
HorizonEngine.registerHorizonOptions and HorizonEngine.unregisterHorizonOptions.///
For more information on horizon paths see HorizonEngine.
-
Initializes instance of
HorizonPath.Declaration
Swift
public init( pathID: Int, parentPathID: Int, offsetOnParentPath: Measurement<UnitLength>?, horizonElements: [HorizonElementType: [HorizonElement]], pathGeometry: [PathGeometryElement] )Parameters
pathIDIdentifier of this path.
parentPathIDIdentifier of the parent path (0 if there is no parent path).
offsetOnParentPathOffset on the parent path of the stub where this path starts, nil if there is no parent path.
horizonElementsHorizon elements
HorizonElementthat belong to this path. Mapped to horizon element typesHorizonElementType.pathGeometryList of geometry elements
PathGeometryElementfor this path.
-
Identifier of this path.
Declaration
Swift
public let pathID: Int -
Identifier of the parent path, 0 if there is no parent path.
Declaration
Swift
public let parentPathID: Int -
Offset on the parent path of the stub where this path starts, nil if there is no parent path.
Declaration
Swift
public let offsetOnParentPath: Measurement<UnitLength>? -
Horizon elements that belong to this path. Mapped to horizon element types .
Declaration
Swift
public let horizonElements: [HorizonElementType : [HorizonElement]] -
List of geometry elements for this path.
Declaration
Swift
public let pathGeometry: [PathGeometryElement] -
Equatable method.
Declaration
Swift
public static func == (lhs: HorizonPath, rhs: HorizonPath) -> Bool -
Returns all the horizon elements
HorizonElementthat belong to this path. Elements of the same typeHorizonElementTypeare provided in increasing order of the start offsetHorizonElement.startOffset.Declaration
Swift
public func getElements() -> [HorizonElement]Return Value
The array of horizon elements
HorizonElementthat belong to this path. -
Returns all the horizon elements
HorizonElementof the specified typesHorizonElementTypethat belong to this path. Elements of the same type are provided in increasing order of the start offsetHorizonElement.startOffset.Declaration
Swift
public func getElements(types: [HorizonElementType]) -> [HorizonElement]Parameters
typesThe types of horizon elements
HorizonElementto return.Return Value
The array of horizon elements
HorizonElementof the given typesHorizonElementTypethat belong to this path. -
Returns all the horizon elements of the specified type that belong to this path. The elements are provided in increasing order of the start offset and end offset.
Declaration
Swift
public func getElements(type: HorizonElementType) -> [HorizonElement]Parameters
typeType of horizon elements to return.
Return Value
Array of horizon elements of the given types that belong to this path.
TomTom SDK for iOS (0.53.1)
HorizonPath