Intersection

@objc(MBIntersection)
public class Intersection : NSObject, NSSecureCoding

A single cross street along a step.

  • The geographic coordinates at the center of the intersection.

    Declaration

    Swift

    @objc
    public let location: CLLocationCoordinate2D
  • An array of CLLocationDirections indicating the absolute headings of the roads that meet at the intersection.

    A road is represented in this array by a heading indicating the direction from which the road meets the intersection. To get the direction of travel when leaving the intersection along the road, rotate the heading 180 degrees.

    A single road that passes through this intersection is represented by two items in this array: one for the segment that enters the intersection and one for the segment that exits it.

    Declaration

    Swift

    @objc
    public let headings: [CLLocationDirection]
  • The indices of the items in the headings array that correspond to the roads that may be used to leave the intersection.

    This index set effectively excludes any one-way road that leads toward the intersection.

    Declaration

    Swift

    @objc
    public let outletIndexes: IndexSet
  • The index of the item in the headings array that corresponds to the road that the containing route step uses to approach the intersection.

    Declaration

    Swift

    @objc
    public let approachIndex: Int
  • The index of the item in the headings array that corresponds to the road that the containing route step uses to leave the intersection.

    Declaration

    Swift

    @objc
    public let outletIndex: Int
  • An array of Lane objects representing all the lanes of the road that the containing route step uses to approach the intersection.

    If no lane information is available for an intersection, this property’s value is nil. The first item corresponds to the leftmost lane, the second item corresponds to the second lane from the left, and so on, regardless of whether the surrounding country drives on the left or on the right.

    Declaration

    Swift

    @objc
    public let approachLanes: [Lane]?
  • The indices of the items in the approachLanes array that correspond to the roads that may be used to execute the maneuver.

    If no lane information is available for an intersection, this property’s value is nil.

    Declaration

    Swift

    @objc
    public let usableApproachLanes: IndexSet?
  • The road classes of the road that the containing step uses to leave the intersection.

    If road class information is unavailable, this property is set to nil.

    Declaration

    Swift

    public let outletRoadClasses: RoadClasses?