public enum RoutingPreference extends Enum<RoutingPreference> implements com.google.protobuf.ProtocolMessageEnum
A set of values that specify factors to take into consideration when calculating the route.Protobuf enum
google.maps.routing.v2.RoutingPreference| Enum Constant and Description |
|---|
ROUTING_PREFERENCE_UNSPECIFIED
No routing preference specified.
|
TRAFFIC_AWARE
Calculates routes taking live traffic conditions into consideration.
|
TRAFFIC_AWARE_OPTIMAL
Calculates the routes taking live traffic conditions into consideration,
without applying most performance optimizations.
|
TRAFFIC_UNAWARE
Computes routes without taking live traffic conditions into consideration.
|
UNRECOGNIZED |
| Modifier and Type | Field and Description |
|---|---|
static int |
ROUTING_PREFERENCE_UNSPECIFIED_VALUE
No routing preference specified.
|
static int |
TRAFFIC_AWARE_OPTIMAL_VALUE
Calculates the routes taking live traffic conditions into consideration,
without applying most performance optimizations.
|
static int |
TRAFFIC_AWARE_VALUE
Calculates routes taking live traffic conditions into consideration.
|
static int |
TRAFFIC_UNAWARE_VALUE
Computes routes without taking live traffic conditions into consideration.
|
| Modifier and Type | Method and Description |
|---|---|
static RoutingPreference |
forNumber(int value) |
static com.google.protobuf.Descriptors.EnumDescriptor |
getDescriptor() |
com.google.protobuf.Descriptors.EnumDescriptor |
getDescriptorForType() |
int |
getNumber() |
com.google.protobuf.Descriptors.EnumValueDescriptor |
getValueDescriptor() |
static com.google.protobuf.Internal.EnumLiteMap<RoutingPreference> |
internalGetValueMap() |
static RoutingPreference |
valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) |
static RoutingPreference |
valueOf(int value)
Deprecated.
Use
forNumber(int) instead. |
static RoutingPreference |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static RoutingPreference[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final RoutingPreference ROUTING_PREFERENCE_UNSPECIFIED
No routing preference specified. Default to `TRAFFIC_UNAWARE`.
ROUTING_PREFERENCE_UNSPECIFIED = 0;public static final RoutingPreference TRAFFIC_UNAWARE
Computes routes without taking live traffic conditions into consideration. Suitable when traffic conditions don't matter or are not applicable. Using this value produces the lowest latency. Note: For [`RouteTravelMode`][google.maps.routing.v2.RouteTravelMode] `DRIVE` and `TWO_WHEELER`, the route and duration chosen are based on road network and average time-independent traffic conditions, not current road conditions. Consequently, routes may include roads that are temporarily closed. Results for a given request may vary over time due to changes in the road network, updated average traffic conditions, and the distributed nature of the service. Results may also vary between nearly-equivalent routes at any time or frequency.
TRAFFIC_UNAWARE = 1;public static final RoutingPreference TRAFFIC_AWARE
Calculates routes taking live traffic conditions into consideration. In contrast to `TRAFFIC_AWARE_OPTIMAL`, some optimizations are applied to significantly reduce latency.
TRAFFIC_AWARE = 2;public static final RoutingPreference TRAFFIC_AWARE_OPTIMAL
Calculates the routes taking live traffic conditions into consideration, without applying most performance optimizations. Using this value produces the highest latency.
TRAFFIC_AWARE_OPTIMAL = 3;public static final RoutingPreference UNRECOGNIZED
public static final int ROUTING_PREFERENCE_UNSPECIFIED_VALUE
No routing preference specified. Default to `TRAFFIC_UNAWARE`.
ROUTING_PREFERENCE_UNSPECIFIED = 0;public static final int TRAFFIC_UNAWARE_VALUE
Computes routes without taking live traffic conditions into consideration. Suitable when traffic conditions don't matter or are not applicable. Using this value produces the lowest latency. Note: For [`RouteTravelMode`][google.maps.routing.v2.RouteTravelMode] `DRIVE` and `TWO_WHEELER`, the route and duration chosen are based on road network and average time-independent traffic conditions, not current road conditions. Consequently, routes may include roads that are temporarily closed. Results for a given request may vary over time due to changes in the road network, updated average traffic conditions, and the distributed nature of the service. Results may also vary between nearly-equivalent routes at any time or frequency.
TRAFFIC_UNAWARE = 1;public static final int TRAFFIC_AWARE_VALUE
Calculates routes taking live traffic conditions into consideration. In contrast to `TRAFFIC_AWARE_OPTIMAL`, some optimizations are applied to significantly reduce latency.
TRAFFIC_AWARE = 2;public static final int TRAFFIC_AWARE_OPTIMAL_VALUE
Calculates the routes taking live traffic conditions into consideration, without applying most performance optimizations. Using this value produces the highest latency.
TRAFFIC_AWARE_OPTIMAL = 3;public static RoutingPreference[] values()
for (RoutingPreference c : RoutingPreference.values()) System.out.println(c);
public static RoutingPreference valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic final int getNumber()
getNumber in interface com.google.protobuf.Internal.EnumLitegetNumber in interface com.google.protobuf.ProtocolMessageEnum@Deprecated public static RoutingPreference valueOf(int value)
forNumber(int) instead.value - The numeric wire value of the corresponding enum entry.public static RoutingPreference forNumber(int value)
value - The numeric wire value of the corresponding enum entry.public static com.google.protobuf.Internal.EnumLiteMap<RoutingPreference> internalGetValueMap()
public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor()
getValueDescriptor in interface com.google.protobuf.ProtocolMessageEnumpublic final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType()
getDescriptorForType in interface com.google.protobuf.ProtocolMessageEnumpublic static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor()
public static RoutingPreference valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc)
Copyright © 2025 Google LLC. All rights reserved.