RoadProperties
public struct RoadProperties : Equatable
Provides information about the properties of the road at the current location.
The name of the bridge or nil if not applicable (i.e., isBridge
is false) or not available.
It is not mutually exclusive with tunnelName
.
Declaration
Swift
public let bridgeName: String?
Contains boundary values for the parameters used to initialize TomTomSDKCommon/RoadProperties
.
Declaration
Swift
public enum Constants
Driving side of the current road.
Declaration
Swift
public let drivingSide: DrivingSide
Indicates relative importance of the road in the routing network. Lower values mean higher
priority. Regular values are in functionalRoadClassRange
.
A value equal to the Constants.functionalRoadClassRange.lowerBound
indicates the road with the highest priority.
A value equal to the Constants.functionalRoadClassRange.upperBound
indicates the road with the lowest priority.
Declaration
Swift
public let functionalRoadClass: Int?
init(numberOfLanes:functionalRoadClass:roadType:roadCondition:drivingSide:isOverpass:isUnderpass:isDividedRoad:isTransitProhibited:isTollRoad:isUrbanArea:isComplexIntersection:isTunnel:tunnelName:isBridge:bridgeName:)
Creates an instance of RoadProperties
with the given properties.
Declaration
Swift
public init(
numberOfLanes: NumberOfLanes,
functionalRoadClass: Int? = nil,
roadType: RoadType? = nil,
roadCondition: RoadCondition? = nil,
drivingSide: DrivingSide,
isOverpass: Bool = false,
isUnderpass: Bool = false,
isDividedRoad: Bool = false,
isTransitProhibited: Bool = false,
isTollRoad: Bool = false,
isUrbanArea: Bool = false,
isComplexIntersection: Bool = false,
isTunnel: Bool = false,
tunnelName: String? = nil,
isBridge: Bool = false,
bridgeName: String? = nil
)
Parameters
numberOfLanes
|
Number of lanes on the current road. |
functionalRoadClass
|
Indicates relative importance of the road in the routing network. Lower values mean higher priority. Regular values are in range of |
roadType
|
The type of the current road. |
roadCondition
|
The value describing road’s surfaces. |
drivingSide
|
Driving side of the current road. |
isOverpass
|
True if on an overpass, false otherwise. |
isUnderpass
|
True if the road is an underpass. False otherwise. |
isDividedRoad
|
Flag that indicates whether the road lanes are separated by some type of a physical barrier. True if dual carriage, false if single carriage. |
isTransitProhibited
|
Flag that indicates whether transit on the road is prohibited. True if prohibited, false otherwise. |
isTollRoad
|
Flag that indicates whether the road requires a toll payment. True if toll is required, false otherwise. |
isUrbanArea
|
Flag that indicates whether the road is in a built-up area. True if in a built-up area, false otherwise. |
isComplexIntersection
|
Flag that indicates whether the road is part of a complex intersection. True if part of a complex intersection, false otherwise. |
isTunnel
|
Flag that indicates whether the road is in a tunnel. True if the road is in a tunnel, false otherwise. |
tunnelName
|
The name of the tunnel or nil if not applicable (i.e., |
isBridge
|
Flag that indicates whether the road is on a bridge. True if the road is on a bridge, false otherwise. |
bridgeName
|
The name of the bridge or nil if not applicable (i.e., |
Flag that indicates whether the road is on a bridge. True if the road is on a bridge, false otherwise.
It is not mutually exclusive with isTunnel
.
Declaration
Swift
public let isBridge: Bool
Flag that indicates whether the road is part of a complex intersection: true if part of a complex intersection, false otherwise.
Declaration
Swift
public let isComplexIntersection: Bool
Flag that indicates whether the road lanes are separated by some type of a physical barrier: true if dual carriage, false if single carriage.
Declaration
Swift
public let isDividedRoad: Bool
Flag that indicates whether the road is on an overpass: true if on an overpass, false otherwise.
Declaration
Swift
public let isOverpass: Bool
Flag that indicates whether the road requires a toll payment: true if toll is required, false otherwise.
Declaration
Swift
public let isTollRoad: Bool
Flag that indicates whether transit on the road is prohibited: true if prohibited, false otherwise.
Declaration
Swift
public let isTransitProhibited: Bool
Flag that indicates whether the road is in a tunnel. True if the road is in a tunnel, false otherwise.
It is not mutually exclusive with isBridge
.
Declaration
Swift
public let isTunnel: Bool
Flag that indicates whether the road is an underpass. True, if the road is an underpass, false otherwise.
Declaration
Swift
public let isUnderpass: Bool
Flag that indicates whether the road is in a built-up area: true if in a built-up area, false otherwise.
Declaration
Swift
public let isUrbanArea: Bool
Number of lanes on the road.
Declaration
Swift
public let numberOfLanes: NumberOfLanes
Road condition. It describes the surface of the road.
Declaration
Swift
public let roadCondition: RoadCondition?
The type of the road.
Declaration
Swift
public let roadType: RoadType?
The name of the tunnel or nil if not applicable (i.e., isTunnel
is false) or not available.
It is not mutually exclusive with bridgeName
.
Declaration
Swift
public let tunnelName: String?