RoutingOptions.TravelMode

  • RoutingOptions.TravelMode is an annotation used to specify the mode of transportation for directions.

  • The default travel mode is DRIVING.

  • Available travel modes include DRIVING, CYCLING, WALKING, TWO_WHEELER, and TAXI.

  • Each travel mode provides tailored directions optimized for the specific type of transportation.

  • You can set the desired travel mode using RoutingOptions.travelMode(int).

public static abstract @interface RoutingOptions.TravelMode implements Annotation

Specifies the type of transportation used to tailor the directions. The default is DRIVING.

Constant Summary

int CYCLING Provides directions based on travel for a bicycle.
int DRIVING Provides directions based on travel for a 4-wheeled, motorized vehicle.
int TAXI Provides directions on routes for a vehicle authorized to use taxi lanes.
int TWO_WHEELER Provides directions based on travel for 2-wheeled, motorized transport.
int WALKING Provides directions based on walking.

Inherited Method Summary

Constants

public static final int CYCLING

Provides directions based on travel for a bicycle.

Constant Value: 1

public static final int DRIVING

Provides directions based on travel for a 4-wheeled, motorized vehicle. For example, a car or truck.

Constant Value: 0

public static final int TAXI

Provides directions on routes for a vehicle authorized to use taxi lanes. This is an experimental feature.

Constant Value: 4

public static final int TWO_WHEELER

Provides directions based on travel for 2-wheeled, motorized transport. For example, a motorcycle or scooter.

Constant Value: 3

public static final int WALKING

Provides directions based on walking.

Note: During walking navigation, the chevron always points in the direction that the user's device is pointing (toward the top of the device in portrait mode). Keep in mind that when testing with an emulator, neither the chevron direction nor the map orientation will appear to change. However, when using a physical device, the map orientation will change when the device is rotated, while the chevron continues to point in the direction that the device is pointing.

Constant Value: 2