SpeedLimitElement
public struct SpeedLimitElement : HorizonElement, Equatable
Describes a speed limit on the horizon element.
This structure holds a horizon element with information regarding speed limits. It contains information regarding speed limit value and type
To obtain SpeedLimitElement
horizon elements, the integrator must create an instance of HorizonEngine
,
register HorizonOptions
including elementTypes
containing HorizonElementType
.speedLimitsType
with a call to HorizonEngine
.registerHorizonOptions
,
and request a HorizonResult
using the previously registered HorizonOptions
with a call to
HorizonEngine
.generateHorizon
.
To retrieve the speed limits for a specific vehicle type, create a TomTomSDKCommon.Vehicle
of that type
(e.g., for trucks, create a Truck
instance). To create the vehicle instance, either use TomTomSDKVehicle.DefaultVehicleProvider
or your own implementation of TomTomSDKVehicle.VehicleProvider
.
The TomTomSDKVehicle.VehicleProvider
instance should be the same as the one provided to
TomTomSDKNavigation.NavigationConfiguration
.
Attention
speed limits are affected mostly by vehicle type TomTomSDKCommon.VehicleType
,
but apart from the vehicle type, some other vehicle characteristics might be considered, such as weight, type of load, and many others.
Important
This is a Public Preview API. It may be changed or removed at any time.
-
Creates an instance of
SpeedLimitElement
.Declaration
Swift
public init( id: Int, pathID: Int, startOffset: Measurement<UnitLength>, endOffset: Measurement<UnitLength>, speedLimit: TomTomSDKCommon.SpeedLimit )
-
Type of the element. Used to filter elements by type.
Declaration
Swift
public let elementType: HorizonElementType
-
Identifier of this element.
Declaration
Swift
public let id: Int
-
Identifier of the path where this element belongs.
Declaration
Swift
public let pathID: Int
-
Start offset on the path.
Declaration
Swift
public let startOffset: Measurement<UnitLength>
-
End offset on the path.
Declaration
Swift
public let endOffset: Measurement<UnitLength>
-
Speed limit on the element.
Declaration
Swift
public let speedLimit: TomTomSDKCommon.SpeedLimit