RouteLeg

extension RouteLeg
  • An array containing the traffic congestion level along each road segment in the route leg geometry.

    The array is formed either by converting values of segmentNumericCongestionLevels to CongestionLevel type (see CongestionRange) or by taking segmentCongestionLevels, depening whether AttributeOptions.numericCongestionLevel or AttributeOptions.congestionLevel was specified in DirectionsOptions.attributes during Directions request.

    If both are present, segmentNumericCongestionLevels is preferred.

    If none are present, returns nil.

    Declaration

    Swift

    public var resolvedCongestionLevels: [CongestionLevel]? { get }
  • Declaration

    Swift

    public var shape: LineString { get }
  • Returns an array of MapboxStreetsRoadClass objects for specific leg. MapboxStreetsRoadClass will be set to nil if it’s not present in Intersection.

    Declaration

    Swift

    public var streetsRoadClasses: [MapboxStreetsRoadClass?] { get }
  • Returns an array of RoadClasses objects for specific leg. RoadClasses will be set to nil if it’s not present in Intersection.

    Declaration

    Swift

    public var roadClasses: [RoadClasses?] { get }