Class BorderCrossingWarning

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

public final class BorderCrossingWarning extends Object

A border crossing. The main field describing the border crossing is type specifying whether the border crossing is given for a country border or a state border. The type must be known. The country and state codes are contained in administrativeRules along with other information such as speed limits, u-turn regulations or pre-trip planning information contained by the AdministrativeRules.

Use BorderCrossingWarningListener to get notifications about upcoming country or state border crossings.

  • Field Details

    • id

      public int id

      Unique identifier for this specific border crossing 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.

    • distanceToBorderCrossingInMeters

      public double distanceToBorderCrossingInMeters

      Distance to the border crossing in meters.

    • type

      @NonNull public BorderCrossingType type

      Type of border crossing.

    • administrativeRules

      @NonNull public AdministrativeRules administrativeRules

      The administrative rules for the country or state after the border crossing. It contains information regarding rules such as driving side, speed limits, various sticker requirements, toll costs and others.

    • distanceType

      @NonNull public DistanceType distanceType

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

    • commercialVehicleRegulations

      @Nullable public AdministrativeCommercialVehicleRules commercialVehicleRegulations

      Commercial vehicle regulations for the administrative region after the border crossing. Contains access restrictions, speed limits, and drive/rest rules applicable to commercial vehicles. This field is only populated when crossing into a region with specific commercial vehicle regulations.

  • Constructor Details

    • BorderCrossingWarning

      public BorderCrossingWarning(double distanceToBorderCrossingInMeters, @NonNull BorderCrossingType type, @NonNull AdministrativeRules administrativeRules, @NonNull DistanceType distanceType)

      Creates a new instance.

      Parameters:
      distanceToBorderCrossingInMeters -

      Distance to the border crossing in meters.

      type -

      Type of border crossing.

      administrativeRules -

      The administrative rules for the country or state after the border crossing. It contains information regarding rules such as driving side, speed limits, various sticker requirements, toll costs and others.

      distanceType -

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

  • Method Details