TrafficOptimizationMode
public enum TrafficOptimizationMode : UInt32, CaseIterable, Codable
Traffic optimization mode that defines whether and what kind of traffic information should be considered during route calculation.
-
Traffic optimization is enabled, the shape of the route will be adjusted according to the traffic situation that depends on the
RouteOptions.departureTimeorRouteOptions.arrivalTime. As a result, streets with heavy traffic will be avoided whenever possible. Note that this mode enables traffic-aware routing.Declaration
Swift
case timeDependent -
Only long-term road closures are taken into account. Both
RouteOptions.departureTimeandRouteOptions.arrivalTimeare ignored, and the route will be shaped disregarding all the available current and historical traffic information, except long-term road closures. Note that this mode disables traffic-aware routing regardless of other settings.Declaration
Swift
case longTermClosuresOnly -
Traffic optimization is completely disabled, including long-term road closures. Both
RouteOptions.departureTimeandRouteOptions.arrivalTimeare ignored, and the route will be shaped disregarding all the available current and historical traffic information. Note that seasonal closures are not excluded. To exclude seasonal closures, useRoadFeatures.seasonalClosure. Note that this mode disables traffic-aware routing regardless of other settings.Declaration
Swift
case disabled