Class TrafficMergeWarning

java.lang.Object
com.here.sdk.navigation.TrafficMergeWarning

public final class TrafficMergeWarning extends Object

A class that provides warning for merging traffic. The main field describing the merging traffic is TrafficMergeWarning.road_type specifying the type of road containing traffic which is merging with the current road. Use TrafficMergeWarningListener to get notifications about upcoming merging traffic.

  • Field Details

    • id

      public int id

      Unique identifier for this specific traffic merge 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.

    • distanceToTrafficMergeInMeters

      @Deprecated public double distanceToTrafficMergeInMeters
      Deprecated.

      Will be removed in v4.29.0. Use the WarningUpdate implementation instead.

      Distance to merging traffic in meters.

    • roadType

      @NonNull public TrafficMergeRoadType roadType

      Type of road which contains the merging traffic.

    • side

      @NonNull public TrafficMergeSide side

      The side from which the traffic is merging.

    • laneCount

      public int laneCount

      Number of lanes of the merging road containing the traffic. If the road has no lanes defined, than the number of lanes returned will be 1.

    • distanceType

      @Deprecated @NonNull public DistanceType distanceType
      Deprecated.

      Will be removed in v4.29.0. Use the WarningStatus implementation instead.

      The distance type for the warning, e.g. a warning for a new traffic merge location ahead or a warning for passing a traffic merge location. Since the traffic merge warning is given relative to a single position on the route, DistanceType.REACHED will never be given for this warning.

  • Constructor Details

    • TrafficMergeWarning

      @Deprecated public TrafficMergeWarning(int id, @Deprecated double distanceToTrafficMergeInMeters, @NonNull TrafficMergeRoadType roadType, @NonNull TrafficMergeSide side, int laneCount, @Deprecated @NonNull DistanceType distanceType)
      Deprecated.

      Will be removed in v4.29.0. Use the constructor without deprecated fields instead.

      Creates a new instance.

      Parameters:
      id -

      Unique identifier for this specific traffic merge 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.

      distanceToTrafficMergeInMeters -

      Distance to merging traffic in meters.

      roadType -

      Type of road which contains the merging traffic.

      side -

      The side from which the traffic is merging.

      laneCount -

      Number of lanes of the merging road containing the traffic. If the road has no lanes defined, than the number of lanes returned will be 1.

      distanceType -

      The distance type for the warning, e.g. a warning for a new traffic merge location ahead or a warning for passing a traffic merge location. Since the traffic merge warning is given relative to a single position on the route, DistanceType.REACHED will never be given for this warning.

  • Method Details