SpeedLimits
public struct SpeedLimits : HorizonElement
Describes a speed limit on the horizon element.
This class holds a horizon element with information regarding speed limits. It contains information regarding speed limit’s value, type and values detemined by weather conditions.
To obtain SpeedLimits
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, configure proper TomTomSDKCommon.Vehicle',
e.g. for trucks configure a
Truckinstance, by implementing
TomTomSDKVehicle.VehicleProvider
or using default implementation
TomTomSDKVehicle.DefaultVehicleProvider.
An instance of the
TomTomSDKVehicle.VehicleProvidershould be the same as provided to the
TomTomSDKNavigation.NavigationConfiguration`. After that, the horizon provides speed limits for the specific vehicle type.
Attention
speed limits are affected mostly by vehicle type TomTomSDKCommon.VehicleType
,
but 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.
-
Initializes instance of
SpeedLimits
.Declaration
Swift
public init( id: Int, pathID: Int, startOffset: Measurement<UnitLength>, endOffset: Measurement<UnitLength>, speed: Measurement<UnitSpeed>?, type: SpeedLimitsType, speedFog: Measurement<UnitSpeed>?, speedSnow: Measurement<UnitSpeed>?, speedRain: Measurement<UnitSpeed>? )
-
Declaration
Swift
public let elementType: HorizonElementType
-
Declaration
Swift
public let id: Int
-
Declaration
Swift
public let pathID: Int
-
Declaration
Swift
public let startOffset: Measurement<UnitLength>
-
Declaration
Swift
public let endOffset: Measurement<UnitLength>
-
Non-weather dependent speed limit.
Declaration
Swift
public let speed: Measurement<UnitSpeed>?
-
Reason for speed limit.
Declaration
Swift
public let type: SpeedLimitsType
-
Fog-dependent speed limit.
Declaration
Swift
public let speedFog: Measurement<UnitSpeed>?
-
Snow-dependent speed limit.
Declaration
Swift
public let speedSnow: Measurement<UnitSpeed>?
-
Rain-dependent speed limit.
Declaration
Swift
public let speedRain: Measurement<UnitSpeed>?