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

      public double distanceToTrafficMergeInMeters

      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

      @NonNull public DistanceType 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.

  • Constructor Details

    • TrafficMergeWarning

      public TrafficMergeWarning(double distanceToTrafficMergeInMeters, @NonNull DistanceType distanceType)

      Creates a new instance.

      Parameters:
      distanceToTrafficMergeInMeters -

      Distance to merging traffic in meters.

      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