AttributeOptions
public struct AttributeOptions : CustomValueOptionSet, CustomStringConvertible
extension AttributeOptions: Codable
Attributes are metadata information for a route leg.
When any of the attributes are specified, the resulting route leg contains one attribute value for each segment in leg, where a segment is the straight line between two coordinates in the route leg’s full geometry.
-
Declaration
Swift
public var rawValue: Int
-
Declaration
Swift
public var customOptionsByRawValue: [Int : String]
-
Declaration
Swift
public init(rawValue: Int)
-
Declaration
Swift
public init()
-
Live-traffic closures along the road segment.
When this attribute is specified, the
RouteLeg.closures
property is filled with relevant data.This attribute requires
ProfileIdentifier.automobileAvoidingTraffic
and is supported only by Directions and Map Matching requests.Declaration
Swift
public static let closures: AttributeOptions
-
Distance (in meters) along the segment.
When this attribute is specified, the
RouteLeg.segmentDistances
property contains one value for each segment in the leg’s full geometry. When used in Matrix request - will produce a distances matrix in response.Declaration
Swift
public static let distance: AttributeOptions
-
Expected travel time (in seconds) along the segment.
When this attribute is specified, the
RouteLeg.expectedSegmentTravelTimes
property contains one value for each segment in the leg’s full geometry. When used in Matrix request - will produce a durations matrix in response.Declaration
Swift
public static let expectedTravelTime: AttributeOptions
-
Current average speed (in meters per second) along the segment.
When this attribute is specified, the
RouteLeg.segmentSpeeds
property contains one value for each segment in the leg’s full geometry. This attribute is supported only by Directions and Map Matching requests.Declaration
Swift
public static let speed: AttributeOptions
-
Traffic congestion level along the segment.
When this attribute is specified, the
RouteLeg.congestionLevels
property contains one value for each segment in the leg’s full geometry.This attribute requires
ProfileIdentifier.automobileAvoidingTraffic
and is supported only by Directions and Map Matching requests. Any other profile identifier producesCongestionLevel.unknown
for each segment along the route.Declaration
Swift
public static let congestionLevel: AttributeOptions
-
The maximum speed limit along the segment.
When this attribute is specified, the
RouteLeg.segmentMaximumSpeedLimits
property contains one value for each segment in the leg’s full geometry. This attribute is supported only by Directions and Map Matching requests.Declaration
Swift
public static let maximumSpeedLimit: AttributeOptions
-
Traffic congestion level in numeric form.
When this attribute is specified, the
RouteLeg.numericCongestionLevels
property contains one value for each segment in the leg’s full geometry.This attribute requires
ProfileIdentifier.automobileAvoidingTraffic
and is supported only by Directions and Map Matching requests. Any other profile identifier producesnil
for each segment along the route.Declaration
Swift
public static let numericCongestionLevel: AttributeOptions
-
Creates an AttributeOptions from the given description strings.
Declaration
Swift
public init?(descriptions: [String])
-
Declaration
Swift
public var description: String { get }
-
Declaration
Swift
public func encode(to encoder: Encoder) throws
-
Declaration
Swift
public init(from decoder: Decoder) throws