TrafficOptimizationMode (API Reference)
Enum Class TrafficOptimizationMode
- All Implemented Interfaces:
Serializable,Comparable<TrafficOptimizationMode>,Constable
Traffic optimization mode that defines whether and what kind of traffic information should be considered during route calculation.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionTraffic optimization is completely disabled, including long-term road closures.Only long-term road closures are taken into account.Traffic optimization is enabled, the shape of the route will be adjusted according to the traffic situation that depends on theRouteOptions.departureTimeorRouteOptions.arrivalTime. -
Method Summary
Modifier and TypeMethodDescriptionstatic TrafficOptimizationModeReturns the enum constant of this class with the specified name.static TrafficOptimizationMode[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
TIME_DEPENDENT
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. -
LONG_TERM_CLOSURES_ONLY
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. -
DISABLED
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.SEASONAL_CLOSURE. Note that this mode disables traffic-aware routing regardless of other settings.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-