TruckRestrictionWarning
public struct TruckRestrictionWarning : Hashable
Represents truck restrictions. For example, there can be a bridge ahead not high enough to pass a big truck or there can be a road ahead where the truck’s weight exceeds the permissible limit.
-
Unique identifier for this specific truck restriction 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.
Declaration
Swift
public var id: Int32 -
The distance from the current location to the restriction.
Declaration
Swift
public var distanceInMeters: Double -
Weight restriction. It is
nilwhen there is no known weight restriction ahead.Declaration
Swift
public var weightRestriction: WeightRestriction? -
Vehicle dimension restrictions. It is
nilwhen there is no known dimension restriction ahead.Declaration
Swift
public var dimensionRestriction: DimensionRestriction? -
Indicates if the specified truck restriction is ahead of the vehicle or has just passed by. If it is ahead, then
TruckRestrictionWarning.distanceInMetersis greater than 0.Declaration
Swift
public var distanceType: DistanceType -
The trailer count for which the current restriction applies. If the field is ‘null’ then the current restriction does not have a condition based on trailers count.
Declaration
Swift
public var trailerCount: IntegerRange? -
Time rule indicating the time periods for which the restriction applies. If the field is ‘null’ then the restriction is applicable at anytime.
Declaration
Swift
public var timeRule: TimeRule? -
Truck road type restriction.
Declaration
Swift
public var truckRoadType: TruckRoadType? -
The list of hazardous materials which are restricted on the road section for which the warning applies.
Declaration
Swift
public var hazardousMaterials: [HazardousMaterial] -
Tunnel category.
Declaration
Swift
public var tunnelCategory: TunnelCategory? -
The axle count for which the current restriction applies. If this field is
nil, the restriction does not depend on axle count.Declaration
Swift
public var axleCount: IntegerRange? -
init(id:distanceInMeters: weightRestriction: dimensionRestriction: distanceType: trailerCount: timeRule: truckRoadType: hazardousMaterials: tunnelCategory: axleCount: ) Creates a new instance.
Declaration
Swift
public init(id: Int32 = 0, distanceInMeters: Double, weightRestriction: WeightRestriction? = nil, dimensionRestriction: DimensionRestriction? = nil, distanceType: DistanceType, trailerCount: IntegerRange? = nil, timeRule: TimeRule? = nil, truckRoadType: TruckRoadType? = nil, hazardousMaterials: [HazardousMaterial] = [], tunnelCategory: TunnelCategory? = nil, axleCount: IntegerRange? = nil) -
Checks if this truck restriction warning is general. A general warning has no specific restriction conditions set. Please note that time rule still might be set for a general warning, but it is not considered as a specific restriction condition. This method only checks that no specific conditions are set for the warning.
Declaration
Swift
public func isGeneral() -> BoolReturn Value
trueif all restriction fields are null or empty,falseotherwise.