NumberOfLanes
public struct NumberOfLanes
Total number of lanes on the road in both directions.
Important
This is a Public Preview API. It may be changed or removed at any time.-
Initializes
NumberOfLanes.Throws
- Throws:
GeneralRoadElementsError.invalidNumberOfLanesInDrivingDirectionif the number of lanes in driving direction is not in the definedNumberOfLanesrange.GeneralRoadElementsError.invalidNumberOfLanesInOppositeDirectionif the number of lanes in opposite direction is not in the definedNumberOfLanesrange.Important
This is a Public Preview API. It may be changed or removed at any time.
Declaration
Swift
public init(inDrivingDirection: Int?, inOppositeDirection: Int?) throwsParameters
inDrivingDirectionNumber of lanes on the road in the driving direction or nil if the number of lanes is unknown.
inOppositeDirectionNumber of lanes on the road in the opposite direction or nil if the number of lanes is unknown.
-
Contains threshold values for the parameters used to initialize
NumberOfLanes.See moreImportant
This is a Public Preview API. It may be changed or removed at any time.Declaration
Swift
public enum Constants -
The number of lanes on the road in the driving direction or nil if the number of lanes is not known. If available, the value is in the range
Constants.numberOfLanesRange. A value of 0 indicates that the vehicle is moving in the wrong direction on a one-way road. A value equal to theConstants.numberOfLanesRange.upperBoundindicates that the actual number of lanes is greater than or equal to theConstants.numberOfLanesRange.upperBound. The value comprises both normal and exit lanes. NumberOfLanes.inDrivingDirection and NumberOfLanes.inOppositeDirection can both be nil at the same time.Declaration
Swift
public let inDrivingDirection: Int? -
The number of lanes on the road in the opposite direction or nil if the number of lanes is not known. If available, the value is in the range
NumberOfLanes.Constants.numberOfLanesRange. A value of 0 indicates that the vehicle is moving on a one-way road. A value equal to theConstants.numberOfLanesRange.upperBoundindicates that the actual number of lanes is greater than or equal to theConstants.numberOfLanesRange.upperBound. The value comprises both normal and exit lanes. NumberOfLanes.inDrivingDirection and NumberOfLanes.inOppositeDirection can both be nil at the same time.Declaration
Swift
public let inOppositeDirection: Int?
NumberOfLanes Structure Reference