RoadProperties
public struct RoadProperties : Equatable
Provides information about the properties of the road at the current location.
-
init(numberOfLanes:functionalRoadClass: roadType: roadCondition: drivingSide: isOverpass: isUnderpass: isDividedRoad: isTransitProhibited: isTollRoad: isUrbanArea: isComplexIntersection: isTunnel: tunnelName: isBridge: bridgeName: ) Creates an instance of
RoadPropertieswith 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
numberOfLanesNumber of lanes on the current road.
functionalRoadClassIndicates relative importance of the road in the routing network. Lower values mean higher priority. Regular values are in range of
functionalRoadClassRange.roadTypeThe type of the current road.
roadConditionThe value describing road’s surfaces.
drivingSideDriving side of the current road.
isOverpassTrue if on an overpass, false otherwise.
isUnderpassTrue if the road is an underpass. False otherwise.
isDividedRoadFlag that indicates whether the road lanes are separated by some type of a physical barrier. True if dual carriage, false if single carriage.
isTransitProhibitedFlag that indicates whether transit on the road is prohibited. True if prohibited, false otherwise.
isTollRoadFlag that indicates whether the road requires a toll payment. True if toll is required, false otherwise.
isUrbanAreaFlag that indicates whether the road is in a built-up area. True if in a built-up area, false otherwise.
isComplexIntersectionFlag that indicates whether the road is part of a complex intersection. True if part of a complex intersection, false otherwise.
isTunnelFlag that indicates whether the road is in a tunnel. True if the road is in a tunnel, false otherwise.
tunnelNameThe name of the tunnel or nil if not applicable (i.e.,
isTunnelis false) or not available.isBridgeFlag that indicates whether the road is on a bridge. True if the road is on a bridge, false otherwise.
bridgeNameThe name of the bridge or nil if not applicable (i.e.,
isBridgeis false) or not available.
-
Contains boundary values for the parameters used to initialize
See moreTomTomSDKCommon/RoadProperties.Declaration
Swift
public enum Constants -
Number of lanes on the road.
Declaration
Swift
public let numberOfLanes: NumberOfLanes -
Indicates relative importance of the road in the routing network. Lower values mean higher priority. Regular values are in
functionalRoadClassRange. A value equal to theConstants.functionalRoadClassRange.lowerBoundindicates the road with the highest priority. A value equal to theConstants.functionalRoadClassRange.upperBoundindicates the road with the lowest priority.Declaration
Swift
public let functionalRoadClass: Int? -
The type of the road.
Declaration
Swift
public let roadType: RoadType? -
Road condition. It describes the surface of the road.
Declaration
Swift
public let roadCondition: RoadCondition? -
Driving side of the current road.
Declaration
Swift
public let drivingSide: DrivingSide -
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 is an underpass. True, if the road is an underpass, false otherwise.
Declaration
Swift
public let isUnderpass: 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 transit on the road is prohibited: true if prohibited, false otherwise.
Declaration
Swift
public let isTransitProhibited: 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 the road is in a built-up area: true if in a built-up area, false otherwise.
Declaration
Swift
public let isUrbanArea: 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 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 -
The name of the tunnel or nil if not applicable (i.e.,
isTunnelis false) or not available. It is not mutually exclusive withbridgeName.Declaration
Swift
public let tunnelName: String? -
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 -
The name of the bridge or nil if not applicable (i.e.,
isBridgeis false) or not available. It is not mutually exclusive withtunnelName.Declaration
Swift
public let bridgeName: String?
TomTom SDK for iOS (TomTomSDKMapMatchingEngineHybrid 0.38.0-rc01 Docs)
RoadProperties