TrafficOnSpan
public struct TrafficOnSpan : Hashable
Traffic information of a span along a route.
-
Index over
TrafficOnSection.geometrywhere this span starts.Declaration
Swift
public var trafficSectionPolylineOffset: Int32 -
Length of the traffic span, in meters.
Declaration
Swift
public var lengthInMeters: Double -
The time duration necessary to traverse the traffic span. This duration takes also into consideration the delays caused by the traffic.
Declaration
Swift
public var duration: TimeInterval -
The estimated extra time in seconds spent due to traffic delays along this traffic span. Negative values indicate that the traffic span can be traversed faster than usual.
Declaration
Swift
public var trafficDelay: TimeInterval -
The speed, in meters per second, without taking traffic into consideration.
Declaration
Swift
public var baseSpeedInMetersPerSecond: Double -
The speed, in meters per second, considering traffic.
Declaration
Swift
public var trafficSpeedInMetersPerSecond: Double -
The traffic jam factor shows the traffic condition in a numeric way. It is a value in the range [0.0, 10.0]. A large jamFactor value means more traffic jam in general. Specifically, 0.0 means free traffic and 10.0 means stationary traffic.
Declaration
Swift
public var jamFactor: Double -
The indices of traffic incidents from the field
TrafficOnSection.trafficIncidents.Declaration
Swift
public var incidentIndices: [Int32] -
The power consumption in kilowatt-hours (kWh) necessary to traverse the span.
Declaration
Swift
public var consumptionInKilowattHours: Double? -
init(trafficSectionPolylineOffset:lengthInMeters: duration: trafficDelay: baseSpeedInMetersPerSecond: trafficSpeedInMetersPerSecond: jamFactor: incidentIndices: consumptionInKilowattHours: ) Creates a new instance.
Declaration
Swift
public init(trafficSectionPolylineOffset: Int32 = 0, lengthInMeters: Double = 0.0, duration: TimeInterval = 0, trafficDelay: TimeInterval = 0, baseSpeedInMetersPerSecond: Double = 0.0, trafficSpeedInMetersPerSecond: Double = 0.0, jamFactor: Double = 0.0, incidentIndices: [Int32] = [], consumptionInKilowattHours: Double? = nil)