RoutingParameters.RoutingPreference

public enum RoutingParameters.RoutingPreference implements Parcelable


A set of values that specify factors to take into consideration when calculating the route.

Summary

Enum Values

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.

Public methods

int
static RoutingParameters.RoutingPreference

Returns the enum constant of this type with the specified name.

static RoutingParameters.RoutingPreference[]

Returns an array containing the constants of this enum type, in the order they're declared.

void
writeToParcel(Parcel dest, int flags)

Inherited methods

From android.os.Parcelable
int

Enum Values

ROUTING_PREFERENCE_UNSPECIFIED

RoutingParameters.RoutingPreference RoutingParameters.RoutingPreference.ROUTING_PREFERENCE_UNSPECIFIED

No routing preference specified. Default to TRAFFIC_UNAWARE.

TRAFFIC_AWARE

RoutingParameters.RoutingPreference RoutingParameters.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_OPTIMAL

RoutingParameters.RoutingPreference RoutingParameters.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_UNAWARE

RoutingParameters.RoutingPreference RoutingParameters.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.

Important note when using the DRIVE and TWO_WHEELER travel modes that are specified in com.google.android.libraries.places.api.model.RoutingParameters.TravelMode. 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.

Constants

Public methods

describeContents

public int describeContents()

valueOf

public static RoutingParameters.RoutingPreference valueOf(String name)

Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Returns
RoutingParameters.RoutingPreference

the enum constant with the specified name

Throws
java.lang.IllegalArgumentException

if this enum type has no constant with the specified name

values

public static RoutingParameters.RoutingPreference[] values()

Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants.

Returns
RoutingParameters.RoutingPreference[]

an array containing the constants of this enum type, in the order they're declared

writeToParcel

public void writeToParcel(Parcel dest, int flags)