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 aTruckinstance, by implementingTomTomSDKVehicle.VehicleProvider or using default implementationTomTomSDKVehicle.DefaultVehicleProvider. An instance of theTomTomSDKVehicle.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.

Lifecycle

Public

  • Declaration

    Swift

    public let elementType: HorizonElementType
  • id

    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>?