VehicleRestrictionElement
public struct VehicleRestrictionElement : HorizonElement
HorizonElement that contains data about a vehicle restriction.
To receive such elements in the HorizonSnapshot, specify HorizonElementType.vehicleRestrictionType
in the HorizonOptions that you register with the HorizonEngine:
let horizonOptions = HorizonOptions(
id: UUID(),
elementTypes: [.vehicleRestrictionType],
...
)
-
Creates a single instance of a horizon element that specifies vehicle restrictions.
Declaration
Swift
public init( id: Int, pathID: Int, startOffset: Measurement<UnitLength>, endOffset: Measurement<UnitLength>, restrictions: [RestrictionData] )Parameters
idThe unique ID of the horizon element.
pathIDThe id of the path to which this element belongs.
startOffsetIndicates the start offset along the path this data applies to.
endOffsetIndicates the end offset along the path this data applies to.
restrictionsA list of vehicle restrictions.
-
Data corresponding to a single vehicle restriction.
See moreDeclaration
Swift
public struct RestrictionData : Equatable
-
Supported vehicle restriction types.
See moreDeclaration
Swift
public enum RestrictionType : Equatable
-
Restricted vehicle types.
See moreDeclaration
Swift
public enum RestrictedVehicleType -
The unique ID of the horizon element.
Declaration
Swift
public let id: Int -
Identifier of the
HorizonPathto which this element belongs.Declaration
Swift
public let pathID: Int -
Start offset on the
HorizonPath.Declaration
Swift
public let startOffset: Measurement<UnitLength> -
End offset on the
HorizonPath.Declaration
Swift
public let endOffset: Measurement<UnitLength> -
Type of the element. Used to filter elements by type.
Declaration
Swift
public let elementType: HorizonElementType -
List of
RestrictionData.Declaration
Swift
public let restrictions: [RestrictionData]
TomTom SDK for iOS (0.53.1)
VehicleRestrictionElement