LaneDecreaseWarning

public struct LaneDecreaseWarning : Hashable

Represents a lane decrease warning that notifies about upcoming reductions in the number of available lanes.

Lane decrease warnings are generated when the road ahead has fewer lanes than the previous road segment provided by sdk.electronic_horizon.ElectronicHorizonEngine, requiring drivers to merge or change lanes. Lane decrease is provided only on highways and motorways. It will not be provided for junctions, when maneuver is given for the lane decrease situation or when the TrafficMergeWarning is provided. Special lanes (e.g. Bus lane, HOV) will only be included to the lane decrease warning generation if the according options are set in TransportSpecification.

Note: This is a beta release of this feature, so there could be a few bugs and unexpected behaviors. Related APIs may change for new releases without a deprecation process.

  • id

    Unique identifier for this lane decrease warning instance. Each warning type (truck restrictions, speed warnings, etc.) maintains its own independent ID namespace. Use this ID to track, update, or dismiss individual warning instances of this type.

    Declaration

    Swift

    public var id: Int32
  • Number of lanes before the lane decrease event.

    Declaration

    Swift

    public var previousLaneNumber: Int32
  • Number of lanes after the lane decrease event.

    Declaration

    Swift

    public var newLaneNumber: Int32
  • Number of lanes decreased on the left side of the road, nil if the left-side change is unknown or not applicable.

    Declaration

    Swift

    public var lanesDecreasedFromLeft: Int32?
  • Number of lanes decreased on the right side of the road, nil if the right-side change is unknown or not applicable.

    Declaration

    Swift

    public var lanesDecreasedFromRight: Int32?
  • The distance from the current location to the Lane decrease event.

    Declaration

    Swift

    public var distanceInMeters: Double
  • Indicates if the specified event is ahead of the vehicle or has just passed by. If it is ahead, then LaneDecreaseWarning.distanceInMeters is greater than 0.

    Declaration

    Swift

    public var distanceType: DistanceType
  • Creates a new instance.

    Declaration

    Swift

    public init(id: Int32 = 0, previousLaneNumber: Int32 = 0, newLaneNumber: Int32 = 0, lanesDecreasedFromLeft: Int32? = nil, lanesDecreasedFromRight: Int32? = nil, distanceInMeters: Double, distanceType: DistanceType)