RoadProperties

public struct RoadProperties : Equatable

RoadProperties provides information about the properties of the road at the current location.

Lifecycle

  • Initializes the LocationContext.RoadProperties instance with the road properties.

    Declaration

    Swift

    public init(
        functionalRoadClass: Int?,
        isUnderpass: Bool? = nil,
        roadType: RoadType? = nil,
        drivingSide: DrivingSide? = nil,
        isTunnel: Bool? = nil,
        tunnelName: String? = nil,
        isBridge: Bool? = false,
        bridgeName: String? = nil
    ) throws

    Parameters

    functionalRoadClass

    Indicates the relative importance of the road in the road network. The value is in the range [0..7], with 0 representing the most important functional road class(FRC). The higher the value, the less important the road class.

    isUnderpass

    True if the road is an underpass. False otherwise.

    roadType

    The type of the current road.

    drivingSide

    Driving side of the current road.

    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., isTunnel is false) or not available.

    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., isBridge is false) or not available.

Public

  • Indicates relative importance of the road in the routing network. Lower values mean higher priority. Regular values are in range [0, 7]. 0 is the highest class, 7 the lowest one.

    Declaration

    Swift

    public let functionalRoadClass: Int?
  • Flag that indicates whether the road is an underpass. True, if the road is an underpass, false otherwise.

    Declaration

    Swift

    public let isUnderpass: Bool?
  • The type of the road.

    Declaration

    Swift

    public let roadType: RoadType?
  • Driving side of the current road.

    Declaration

    Swift

    public let drivingSide: DrivingSide?
  • 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., isTunnel is false) or not available. It is not mutually exclusive with bridgeName.

    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., isBridge is false) or not available. It is not mutually exclusive with tunnelName.

    Declaration

    Swift

    public let bridgeName: String?