Class LaneDecreaseWarning

java.lang.Object
com.here.sdk.warner.LaneDecreaseWarning

public final class LaneDecreaseWarning extends Object

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.

  • Field Details

    • id

      public int 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.

    • previousLaneNumber

      public int previousLaneNumber

      Number of lanes before the lane decrease event.

    • newLaneNumber

      public int newLaneNumber

      Number of lanes after the lane decrease event.

    • lanesDecreasedFromLeft

      @Nullable public Integer lanesDecreasedFromLeft

      Number of lanes decreased on the left side of the road, null if the left-side change is unknown or not applicable.

    • lanesDecreasedFromRight

      @Nullable public Integer lanesDecreasedFromRight

      Number of lanes decreased on the right side of the road, null if the right-side change is unknown or not applicable.

    • distanceInMeters

      public double distanceInMeters

      The distance from the current location to the Lane decrease event.

    • distanceType

      @NonNull public DistanceType distanceType

      Indicates if the specified event is ahead of the vehicle or has just passed by. If it is ahead, then distanceInMeters is greater than 0.

  • Constructor Details

    • LaneDecreaseWarning

      public LaneDecreaseWarning(double distanceInMeters, @NonNull DistanceType distanceType)

      Creates a new instance.

      Parameters:
      distanceInMeters -

      The distance from the current location to the Lane decrease event.

      distanceType -

      Indicates if the specified event is ahead of the vehicle or has just passed by. If it is ahead, then distanceInMeters is greater than 0.

  • Method Details