Class DangerZoneWarning

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

public final class DangerZoneWarning extends Object

Represents danger zones. A danger zone refers to areas where there is an increased risk of traffic incidents. These zones are designated to alert drivers to potential hazards and encourage safer driving behaviors. Legally, certain devices can alert you to being in a danger zone, typically indicating the presence of a speed camera. In line with applicable law and industry standard, these alerts are usually provided along a road within a range of 4 km on a motorway, 2 km outside built-up areas, and 300 m in built-up areas​​. The HERE SDK warns when approaching the danger zone, as well as when leaving such a zone. A danger zone may or may not have one or more speed cameras in it. The exact location of such speed cameras is not provided. Note that danger zones are only available in selected countries, such as France.

  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    double
    Deprecated.
    Will be removed in v4.29.0.
    Deprecated.
    Will be removed in v4.29.0.
    int
    Unique identifier for this specific danger zone warning instance.
    boolean
    A flag indicating whether the Danger Zone officially start in the location the user is entering it.
  • Constructor Summary

    Constructors
    Constructor
    Description
    DangerZoneWarning(int id, boolean isZoneStart, double distanceInMeters, DistanceType distanceType)
    Deprecated.
    Will be removed in v4.29.0.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    int
     

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • id

      public int id

      Unique identifier for this specific danger zone 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.

    • isZoneStart

      public boolean isZoneStart

      A flag indicating whether the Danger Zone officially start in the location the user is entering it.

    • distanceInMeters

      @Deprecated public double distanceInMeters
      Deprecated.

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

      The distance from the current location to the Danger zone.

    • distanceType

      @Deprecated @NonNull public DistanceType distanceType
      Deprecated.

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

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

  • Constructor Details

    • DangerZoneWarning

      @Deprecated public DangerZoneWarning(int id, boolean isZoneStart, @Deprecated double distanceInMeters, @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 danger zone 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.

      isZoneStart -

      A flag indicating whether the Danger Zone officially start in the location the user is entering it.

      distanceInMeters -

      The distance from the current location to the Danger zone.

      distanceType -

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

  • Method Details