Class BorderCrossingWarning

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

public final class BorderCrossingWarning extends Object

A border crossing. The main fields describing the border crossing are type specifying whether the border crossing is given for a country border or for a state border and countryCode which should be present at all times, regardless if the warning is a country border or a state border. A border crossing must contain a known type and a countryCode. The stateCode is optional. Use BorderCrossingWarningListener to get notifications about upcoming country or state border crossings.

  • Field Details

    • distanceToBorderCrossingInMeters

      public double distanceToBorderCrossingInMeters

      Distance to the border crossing in meters.

    • type

      @NonNull public BorderCrossingType type

      Type of border crossing.

    • countryCode

      @Deprecated @NonNull public CountryCode countryCode
      Deprecated.

      Will be removed in v4.26.0. Use the administrative_rules property to determine the country code.

      Country code for the country after the border crossing. It can be the same as the current country if the border crossing warning is given for a state border crossing.

    • stateCode

      @Deprecated @Nullable public String stateCode
      Deprecated.

      Will be removed in v4.26.0. Use the administrative_rules property to determine the state code.

      The state code after the border crossing. It represents the state / province code. It is a 1 to 3 upper-case characters string that follows the ISO 3166-2 standard, but without the preceding country code (e.g. for Texas, the state code will be TX). It will be null for countries without states or countries in which the states have very similar regulations (e.g. for Germany there will be no state borders).

    • speedLimits

      @Deprecated @NonNull public GeneralVehicleSpeedLimits speedLimits
      Deprecated.

      Will be removed in v4.26.0. Use the administrative_rules property to determine the speed limits.

      The general speed limits in the country / state after 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.

  • 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