BorderCrossingWarning
public struct BorderCrossingWarning : Hashable
A border crossing. The main fields describing the border crossing are BorderCrossingWarning.type specifying whether the border crossing
is given for a country border or for a state border and BorderCrossingWarning.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 BorderCrossingWarning.type and a BorderCrossingWarning.countryCode. The BorderCrossingWarning.stateCode
is optional.
Use BorderCrossingWarningListener to get notifications about upcoming country or state border crossings.
-
Distance to the border crossing in meters.
Declaration
Swift
public var distanceToBorderCrossingInMeters: Double -
Type of border crossing.
Declaration
Swift
public var type: BorderCrossingType -
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.
Declaration
Swift
@available(*, deprecated, message: "Will be removed in v4.26.0. Use the administrative_rules property to determine the country code.") public var countryCode: CountryCode -
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
nilfor countries without states or countries in which the states have very similar regulations (e.g. for Germany there will be no state borders).Declaration
Swift
@available(*, deprecated, message: "Will be removed in v4.26.0. Use the administrative_rules property to determine the state code.") public var stateCode: String? -
The general speed limits in the country / state after border crossing.
Declaration
Swift
@available(*, deprecated, message: "Will be removed in v4.26.0. Use the administrative_rules property to determine the speed limits.") public var speedLimits: GeneralVehicleSpeedLimits -
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.
Declaration
Swift
public var administrativeRules: AdministrativeRules -
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.reachedwill never be given for this warning.Declaration
Swift
public var distanceType: DistanceType -
Creates a new instance.
Declaration
Swift
public init(distanceToBorderCrossingInMeters: Double, type: BorderCrossingType, administrativeRules: AdministrativeRules, distanceType: DistanceType) -
init(distanceToBorderCrossingInMeters:type: countryCode: stateCode: speedLimits: administrativeRules: distanceType: ) Creates a new instance.
Declaration
Swift
@available(*, deprecated) public init(distanceToBorderCrossingInMeters: Double, type: BorderCrossingType, countryCode: CountryCode = CountryCode.deu, stateCode: String? = nil, speedLimits: GeneralVehicleSpeedLimits = GeneralVehicleSpeedLimits(), administrativeRules: AdministrativeRules, distanceType: DistanceType)