VehicleRestriction
public struct VehicleRestriction : Hashable
Represents a vehicle restriction.
Any non nil property adds more details to the restriction.
All properties with value nil indicate a general
truck restriction.
Note: This is a beta release of this feature. Related APIs may change for new releases without a deprecation process.
-
A
SpecificRestrictiondefines what type of restriction applies (weight, height, etc.) and the range of allowed values.Declaration
Swift
public var restriction: SpecificRestriction? -
Restriction on transport of hazardous materials and max allowed tunnel category. For example, (FLAMMABLE, TunnelCategory.D) means, a restriction applying for trucks carrying flammable materials are not allowed to enter tunnels category D and E - (TunnelCategory.B and TunnelCategory.C allowed).
Declaration
Swift
public var hazmatRestriction: HazardousMaterialRestriction? -
Restriction applies during specific time.
Declaration
Swift
public var timeRestriction: TimeRestriction? -
Type of weather in which restriction applies.
Declaration
Swift
public var weather: WeatherType? -
Restriction applies to a specific truck category.
Declaration
Swift
public var truckCategory: TruckCategory? -
Number of trailers for which the restriction applies.
Declaration
Swift
public var trailerCount: IntegerRange? -
The axle count for which the current restriction applies. Can be used in conjunction with
RestrictionType.weightPerAxleCountto specify restriction based on weight per number of axles. TheaxleCountconsiders total number of axles on the whole vehicle (truck + trailers). This can be used to limit the weight per axle for the whole truck. IfaxleCountis null, the restriction is general and applies regardless of axle count. If the upper limit of theaxleCountrange is 0 ornilthen it means the restriction applies for values >= lower limit, i.e. the upper limit of range if infinite or unbound. When a user taps the icon, the allowedaxleCountrange can be retrieved directly fromVehicleRestriction.axleCount. Examples:- (2,2) → Restriction applies to vehicles with exactly 2 axles.
- (2,4) → Restriction applies to vehicles with 2, 3, or 4 axles.
- (2, 0) → Restriction applies to vehicles with 2 or more axles (equivalent to 2…∞)
Declaration
Swift
public var axleCount: IntegerRange? -
Number of axles in a group for which the current restriction applies.
axleCountInGroupis a set of axles close together: single, tandem (2), triple (3), etc. Can be used in conjunction withRestrictionType.weightPerAxleGroupto specify restriction based on weight per axle group. TheaxleCountInGroupconsiders number of axles in a specific axle group (usually rear axles on the truck or trailer). This can be used to limit weight for a tandem/triple rear axle group. If the upper limit of theaxleCountInGrouprange is 0 ornilthen it means the restriction applies for values >= lower limit, i.e. the upper limit of range if infinite or unbound. Examples:- (1,1) → Restriction applies to single axle group.
- (2,2) → Restriction applies to tandem axle group.
- (2,4) → Restriction applies to any axle group from 2 to 4 axles.
- (2,0) → Restriction applies to axle groups with 2 or more axles.
Declaration
Swift
public var axleCountInGroup: IntegerRange? -
init(restriction:hazmatRestriction: timeRestriction: weather: truckCategory: trailerCount: axleCount: axleCountInGroup: ) Undocumented
Declaration
Swift
public init(restriction: SpecificRestriction? = nil, hazmatRestriction: HazardousMaterialRestriction? = nil, timeRestriction: TimeRestriction? = nil, weather: WeatherType? = nil, truckCategory: TruckCategory? = nil, trailerCount: IntegerRange? = nil, axleCount: IntegerRange? = nil, axleCountInGroup: IntegerRange? = nil)