public enum RouteTravelMode extends Enum<RouteTravelMode> implements com.google.protobuf.ProtocolMessageEnum
A set of values used to specify the mode of travel. NOTE: `WALK`, `BICYCLE`, and `TWO_WHEELER` routes are in beta and might sometimes be missing clear sidewalks, pedestrian paths, or bicycling paths. You must display this warning to the user for all walking, bicycling, and two-wheel routes that you display in your app.Protobuf enum
google.maps.routing.v2.RouteTravelMode| Enum Constant and Description |
|---|
BICYCLE
Travel by bicycle.
|
DRIVE
Travel by passenger car.
|
TRANSIT
Travel by public transit routes, where available.
|
TRAVEL_MODE_UNSPECIFIED
No travel mode specified.
|
TWO_WHEELER
Two-wheeled, motorized vehicle.
|
UNRECOGNIZED |
WALK
Travel by walking.
|
| Modifier and Type | Field and Description |
|---|---|
static int |
BICYCLE_VALUE
Travel by bicycle.
|
static int |
DRIVE_VALUE
Travel by passenger car.
|
static int |
TRANSIT_VALUE
Travel by public transit routes, where available.
|
static int |
TRAVEL_MODE_UNSPECIFIED_VALUE
No travel mode specified.
|
static int |
TWO_WHEELER_VALUE
Two-wheeled, motorized vehicle.
|
static int |
WALK_VALUE
Travel by walking.
|
| Modifier and Type | Method and Description |
|---|---|
static RouteTravelMode |
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<RouteTravelMode> |
internalGetValueMap() |
static RouteTravelMode |
valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) |
static RouteTravelMode |
valueOf(int value)
Deprecated.
Use
forNumber(int) instead. |
static RouteTravelMode |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static RouteTravelMode[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final RouteTravelMode TRAVEL_MODE_UNSPECIFIED
No travel mode specified. Defaults to `DRIVE`.
TRAVEL_MODE_UNSPECIFIED = 0;public static final RouteTravelMode DRIVE
Travel by passenger car.
DRIVE = 1;public static final RouteTravelMode BICYCLE
Travel by bicycle.
BICYCLE = 2;public static final RouteTravelMode WALK
Travel by walking.
WALK = 3;public static final RouteTravelMode TWO_WHEELER
Two-wheeled, motorized vehicle. For example, motorcycle. Note that this differs from the `BICYCLE` travel mode which covers human-powered mode.
TWO_WHEELER = 4;public static final RouteTravelMode TRANSIT
Travel by public transit routes, where available.
TRANSIT = 7;public static final RouteTravelMode UNRECOGNIZED
public static final int TRAVEL_MODE_UNSPECIFIED_VALUE
No travel mode specified. Defaults to `DRIVE`.
TRAVEL_MODE_UNSPECIFIED = 0;public static final int DRIVE_VALUE
Travel by passenger car.
DRIVE = 1;public static final int BICYCLE_VALUE
Travel by bicycle.
BICYCLE = 2;public static final int WALK_VALUE
Travel by walking.
WALK = 3;public static final int TWO_WHEELER_VALUE
Two-wheeled, motorized vehicle. For example, motorcycle. Note that this differs from the `BICYCLE` travel mode which covers human-powered mode.
TWO_WHEELER = 4;public static final int TRANSIT_VALUE
Travel by public transit routes, where available.
TRANSIT = 7;public static RouteTravelMode[] values()
for (RouteTravelMode c : RouteTravelMode.values()) System.out.println(c);
public static RouteTravelMode 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 RouteTravelMode valueOf(int value)
forNumber(int) instead.value - The numeric wire value of the corresponding enum entry.public static RouteTravelMode forNumber(int value)
value - The numeric wire value of the corresponding enum entry.public static com.google.protobuf.Internal.EnumLiteMap<RouteTravelMode> 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 RouteTravelMode valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc)
Copyright © 2025 Google LLC. All rights reserved.