Android 12 Developer Preview is here! Try it out, and give us your feedback!

Maneuver

public final class Maneuver
extends Object

java.lang.Object
   ↳ com.google.android.libraries.car.app.navigation.model.Maneuver


Information about a maneuver that the driver will be required to perform.

Summary

Nested classes

class Maneuver.Builder

A builder of Maneuver

Constants

int TYPE_DEPART

Starting point of the navigation.

int TYPE_DESTINATION

Arrival at a destination.

int TYPE_DESTINATION_LEFT

Arrival to a destination located to the left side of the road.

int TYPE_DESTINATION_RIGHT

Arrival to a destination located to the right side of the road.

int TYPE_DESTINATION_STRAIGHT

Arrival to a destination located straight ahead.

int TYPE_FERRY_BOAT

Drive towards a boat ferry for vehicles.

int TYPE_FERRY_TRAIN

Drive towards a train ferry for vehicles (e.g.

int TYPE_FORK_LEFT

Keep to the left as the road diverges.

int TYPE_FORK_RIGHT

Keep to the right as the road diverges.

int TYPE_KEEP_LEFT

No turn, from 0 (included) to 10 (excluded) degrees.

int TYPE_KEEP_RIGHT

No turn, from 0 (included) to 10 (excluded) degrees.

int TYPE_MERGE_LEFT

Current road joins another on the left.

int TYPE_MERGE_RIGHT

Current road joins another on the right.

int TYPE_MERGE_SIDE_UNSPECIFIED

Current road joins another without direction specified.

int TYPE_NAME_CHANGE

No turn, but the street name changes.

int TYPE_OFF_RAMP_NORMAL_LEFT

A left turn to exit a turnpike or freeway, from 45 (included) to 135 (excluded) degrees.

int TYPE_OFF_RAMP_NORMAL_RIGHT

A left right to exit a turnpike or freeway, from 45 (included) to 135 (excluded) degrees.

int TYPE_OFF_RAMP_SLIGHT_LEFT

A left turn to exit a turnpike or freeway, from 10 (included) to 45 (excluded) degrees.

int TYPE_OFF_RAMP_SLIGHT_RIGHT

A right turn to exit a turnpike or freeway, from 10 (included) to 45 (excluded) degrees.

int TYPE_ON_RAMP_NORMAL_LEFT

Regular left turn to enter a turnpike or freeway, from 45 (included) to 135 (excluded) degrees.

int TYPE_ON_RAMP_NORMAL_RIGHT

Regular right turn to enter a turnpike or freeway, from 45 (included) to 135 (excluded) degrees.

int TYPE_ON_RAMP_SHARP_LEFT

Sharp left turn to enter a turnpike or freeway, from 135 (included) to 175 (excluded) degrees.

int TYPE_ON_RAMP_SHARP_RIGHT

Sharp right turn to enter a turnpike or freeway, from 135 (included) to 175 (excluded) degrees.

int TYPE_ON_RAMP_SLIGHT_LEFT

Slight left turn to enter a turnpike or freeway, from 10 (included) to 45 (excluded) degrees.

int TYPE_ON_RAMP_SLIGHT_RIGHT

Slight right turn to enter a turnpike or freeway, from 10 (included) to 45 (excluded) degrees.

int TYPE_ON_RAMP_U_TURN_LEFT

Left turn onto the opposite side of the same street to enter a turnpike or freeway, from 175 (included) to 180 (included).

int TYPE_ON_RAMP_U_TURN_RIGHT

Right turn onto the opposite side of the same street to enter a turnpike or freeway, from 175 (included) to 180 (included).

int TYPE_ROUNDABOUT_ENTER

Roundabout entrance on which the current road ends.

int TYPE_ROUNDABOUT_ENTER_AND_EXIT_CCW

Enter a counter-clockwise roundabout and take the Nth exit.

int TYPE_ROUNDABOUT_ENTER_AND_EXIT_CCW_WITH_ANGLE

Enter a counter-clockwise roundabout and take the Nth exit after angle A degrees.

int TYPE_ROUNDABOUT_ENTER_AND_EXIT_CW

Enter a clockwise roundabout and take the Nth exit.

int TYPE_ROUNDABOUT_ENTER_AND_EXIT_CW_WITH_ANGLE

Enter a clockwise roundabout and take the Nth exit after angle A degrees.

int TYPE_ROUNDABOUT_EXIT

Used when leaving a roundabout when the step starts in it.

int TYPE_STRAIGHT

Driver should steer straight.

int TYPE_TURN_NORMAL_LEFT

Regular left turn at an intersection, from 45 (included) to 135 (excluded) degrees.

int TYPE_TURN_NORMAL_RIGHT

Regular right turn at an intersection, from 45 (included) to 135 (excluded) degrees.

int TYPE_TURN_SHARP_LEFT

Sharp left turn at an intersection, from 135 (included) to 175 (excluded) degrees.

int TYPE_TURN_SHARP_RIGHT

Sharp right turn at an intersection, from 135 (included) to 175 (excluded) degrees.

int TYPE_TURN_SLIGHT_LEFT

Slight left turn at an intersection, from 10 (included) to 45 (excluded) degrees.

int TYPE_TURN_SLIGHT_RIGHT

Slight right turn at an intersection, from 10 (included) to 45 (excluded) degrees.

int TYPE_UNKNOWN

Maneuver type is unknown, no maneuver information should be displayed.

int TYPE_U_TURN_LEFT

Left turn onto the opposite side of the same street, from 175 (included) to 180 (included) degrees.

int TYPE_U_TURN_RIGHT

A right turn onto the opposite side of the same street, from 175 (included) to 180 (included) degrees.

Public methods

static Maneuver.Builder builder(int type)

Constructs a new builder of Maneuver.

boolean equals(Object other)
int hashCode()
String toString()

Inherited methods

Constants

TYPE_DEPART

public static final int TYPE_DEPART

Starting point of the navigation.

For example, "Start driving on Main St."

Constant Value: 1 (0x00000001)

TYPE_DESTINATION

public static final int TYPE_DESTINATION

Arrival at a destination.

Constant Value: 39 (0x00000027)

TYPE_DESTINATION_LEFT

public static final int TYPE_DESTINATION_LEFT

Arrival to a destination located to the left side of the road.

Constant Value: 41 (0x00000029)

TYPE_DESTINATION_RIGHT

public static final int TYPE_DESTINATION_RIGHT

Arrival to a destination located to the right side of the road.

Constant Value: 42 (0x0000002a)

TYPE_DESTINATION_STRAIGHT

public static final int TYPE_DESTINATION_STRAIGHT

Arrival to a destination located straight ahead.

Constant Value: 40 (0x00000028)

TYPE_FERRY_BOAT

public static final int TYPE_FERRY_BOAT

Drive towards a boat ferry for vehicles.

For example, this is used to indicate "Take the ferry".

Constant Value: 37 (0x00000025)

TYPE_FERRY_TRAIN

public static final int TYPE_FERRY_TRAIN

Drive towards a train ferry for vehicles (e.g. "Take the train").

Constant Value: 38 (0x00000026)

TYPE_FORK_LEFT

public static final int TYPE_FORK_LEFT

Keep to the left as the road diverges.

For example, this is used to indicate "Keep left at the fork".

Constant Value: 25 (0x00000019)

TYPE_FORK_RIGHT

public static final int TYPE_FORK_RIGHT

Keep to the right as the road diverges.

For example, this is used to indicate "Keep right at the fork".

Constant Value: 26 (0x0000001a)

TYPE_KEEP_LEFT

public static final int TYPE_KEEP_LEFT

No turn, from 0 (included) to 10 (excluded) degrees.

This is used in contrast to TYPE_STRAIGHT for disambiguating cases where there is more than one option to go into the same general direction.

Constant Value: 3 (0x00000003)

TYPE_KEEP_RIGHT

public static final int TYPE_KEEP_RIGHT

No turn, from 0 (included) to 10 (excluded) degrees.

This is used in contrast to TYPE_STRAIGHT for disambiguating cases where there is more than one option to go into the same general direction.

Constant Value: 4 (0x00000004)

TYPE_MERGE_LEFT

public static final int TYPE_MERGE_LEFT

Current road joins another on the left.

For example, this is used to indicate "Merge left onto Main St.".

Constant Value: 27 (0x0000001b)

TYPE_MERGE_RIGHT

public static final int TYPE_MERGE_RIGHT

Current road joins another on the right.

For example, this is used to indicate "Merge left onto Main St.".

Constant Value: 28 (0x0000001c)

TYPE_MERGE_SIDE_UNSPECIFIED

public static final int TYPE_MERGE_SIDE_UNSPECIFIED

Current road joins another without direction specified.

For example, this is used to indicate "Merge onto Main St.".

Constant Value: 29 (0x0000001d)

TYPE_NAME_CHANGE

public static final int TYPE_NAME_CHANGE

No turn, but the street name changes.

For example, "Continue on Main St."

Constant Value: 2 (0x00000002)

TYPE_OFF_RAMP_NORMAL_LEFT

public static final int TYPE_OFF_RAMP_NORMAL_LEFT

A left turn to exit a turnpike or freeway, from 45 (included) to 135 (excluded) degrees.

Constant Value: 23 (0x00000017)

TYPE_OFF_RAMP_NORMAL_RIGHT

public static final int TYPE_OFF_RAMP_NORMAL_RIGHT

A left right to exit a turnpike or freeway, from 45 (included) to 135 (excluded) degrees.

Constant Value: 24 (0x00000018)

TYPE_OFF_RAMP_SLIGHT_LEFT

public static final int TYPE_OFF_RAMP_SLIGHT_LEFT

A left turn to exit a turnpike or freeway, from 10 (included) to 45 (excluded) degrees.

Constant Value: 21 (0x00000015)

TYPE_OFF_RAMP_SLIGHT_RIGHT

public static final int TYPE_OFF_RAMP_SLIGHT_RIGHT

A right turn to exit a turnpike or freeway, from 10 (included) to 45 (excluded) degrees.

Constant Value: 22 (0x00000016)

TYPE_ON_RAMP_NORMAL_LEFT

public static final int TYPE_ON_RAMP_NORMAL_LEFT

Regular left turn to enter a turnpike or freeway, from 45 (included) to 135 (excluded) degrees.

Constant Value: 15 (0x0000000f)

TYPE_ON_RAMP_NORMAL_RIGHT

public static final int TYPE_ON_RAMP_NORMAL_RIGHT

Regular right turn to enter a turnpike or freeway, from 45 (included) to 135 (excluded) degrees.

Constant Value: 16 (0x00000010)

TYPE_ON_RAMP_SHARP_LEFT

public static final int TYPE_ON_RAMP_SHARP_LEFT

Sharp left turn to enter a turnpike or freeway, from 135 (included) to 175 (excluded) degrees.

Constant Value: 17 (0x00000011)

TYPE_ON_RAMP_SHARP_RIGHT

public static final int TYPE_ON_RAMP_SHARP_RIGHT

Sharp right turn to enter a turnpike or freeway, from 135 (included) to 175 (excluded) degrees.

Constant Value: 18 (0x00000012)

TYPE_ON_RAMP_SLIGHT_LEFT

public static final int TYPE_ON_RAMP_SLIGHT_LEFT

Slight left turn to enter a turnpike or freeway, from 10 (included) to 45 (excluded) degrees.

Constant Value: 13 (0x0000000d)

TYPE_ON_RAMP_SLIGHT_RIGHT

public static final int TYPE_ON_RAMP_SLIGHT_RIGHT

Slight right turn to enter a turnpike or freeway, from 10 (included) to 45 (excluded) degrees.

Constant Value: 14 (0x0000000e)

TYPE_ON_RAMP_U_TURN_LEFT

public static final int TYPE_ON_RAMP_U_TURN_LEFT

Left turn onto the opposite side of the same street to enter a turnpike or freeway, from 175 (included) to 180 (included).

Constant Value: 19 (0x00000013)

TYPE_ON_RAMP_U_TURN_RIGHT

public static final int TYPE_ON_RAMP_U_TURN_RIGHT

Right turn onto the opposite side of the same street to enter a turnpike or freeway, from 175 (included) to 180 (included).

Constant Value: 20 (0x00000014)

TYPE_ROUNDABOUT_ENTER

public static final int TYPE_ROUNDABOUT_ENTER

Roundabout entrance on which the current road ends.

For example, this is used to indicate "Enter the roundabout".

Constant Value: 30 (0x0000001e)

TYPE_ROUNDABOUT_ENTER_AND_EXIT_CCW

public static final int TYPE_ROUNDABOUT_ENTER_AND_EXIT_CCW

Enter a counter-clockwise roundabout and take the Nth exit.

The exit number must be passed when created the maneuver.

For example, this is used to indicate "At the roundabout, take the Nth exit".

Constant Value: 34 (0x00000022)

TYPE_ROUNDABOUT_ENTER_AND_EXIT_CCW_WITH_ANGLE

public static final int TYPE_ROUNDABOUT_ENTER_AND_EXIT_CCW_WITH_ANGLE

Enter a counter-clockwise roundabout and take the Nth exit after angle A degrees.

The exit number and angle must be passed when creating the maneuver.

For example, this is used to indicate "At the roundabout, take a sharp right at the Nth exit".

Constant Value: 35 (0x00000023)

TYPE_ROUNDABOUT_ENTER_AND_EXIT_CW

public static final int TYPE_ROUNDABOUT_ENTER_AND_EXIT_CW

Enter a clockwise roundabout and take the Nth exit.

The exit number must be passed when created the maneuver.

For example, this is used to indicate "At the roundabout, take the Nth exit".

Constant Value: 32 (0x00000020)

TYPE_ROUNDABOUT_ENTER_AND_EXIT_CW_WITH_ANGLE

public static final int TYPE_ROUNDABOUT_ENTER_AND_EXIT_CW_WITH_ANGLE

Enter a clockwise roundabout and take the Nth exit after angle A degrees.

The exit number and angle must be passed when creating the maneuver.

For example, this is used to indicate "At the roundabout, take the Nth exit".

Constant Value: 33 (0x00000021)

TYPE_ROUNDABOUT_EXIT

public static final int TYPE_ROUNDABOUT_EXIT

Used when leaving a roundabout when the step starts in it.

For example, this is used to indicate "Exit the roundabout".

Constant Value: 31 (0x0000001f)

TYPE_STRAIGHT

public static final int TYPE_STRAIGHT

Driver should steer straight.

Constant Value: 36 (0x00000024)

TYPE_TURN_NORMAL_LEFT

public static final int TYPE_TURN_NORMAL_LEFT

Regular left turn at an intersection, from 45 (included) to 135 (excluded) degrees.

Constant Value: 7 (0x00000007)

TYPE_TURN_NORMAL_RIGHT

public static final int TYPE_TURN_NORMAL_RIGHT

Regular right turn at an intersection, from 45 (included) to 135 (excluded) degrees.

Constant Value: 8 (0x00000008)

TYPE_TURN_SHARP_LEFT

public static final int TYPE_TURN_SHARP_LEFT

Sharp left turn at an intersection, from 135 (included) to 175 (excluded) degrees.

Constant Value: 9 (0x00000009)

TYPE_TURN_SHARP_RIGHT

public static final int TYPE_TURN_SHARP_RIGHT

Sharp right turn at an intersection, from 135 (included) to 175 (excluded) degrees.

Constant Value: 10 (0x0000000a)

TYPE_TURN_SLIGHT_LEFT

public static final int TYPE_TURN_SLIGHT_LEFT

Slight left turn at an intersection, from 10 (included) to 45 (excluded) degrees.

Constant Value: 5 (0x00000005)

TYPE_TURN_SLIGHT_RIGHT

public static final int TYPE_TURN_SLIGHT_RIGHT

Slight right turn at an intersection, from 10 (included) to 45 (excluded) degrees.

Constant Value: 6 (0x00000006)

TYPE_UNKNOWN

public static final int TYPE_UNKNOWN

Maneuver type is unknown, no maneuver information should be displayed.

TYPE_UNKNOWN may be interpreted differently depending on the consumer. In some cases the previous maneuver will continue to be shown while in others no maneuver will be shown at all.

Constant Value: 0 (0x00000000)

TYPE_U_TURN_LEFT

public static final int TYPE_U_TURN_LEFT

Left turn onto the opposite side of the same street, from 175 (included) to 180 (included) degrees.

Constant Value: 11 (0x0000000b)

TYPE_U_TURN_RIGHT

public static final int TYPE_U_TURN_RIGHT

A right turn onto the opposite side of the same street, from 175 (included) to 180 (included) degrees.

Constant Value: 12 (0x0000000c)

Public methods

builder

public static Maneuver.Builder builder (int type)

Constructs a new builder of Maneuver.

The type should be chosen to reflect the closest semantic meaning of the maneuver. In some cases, an exact type match is not possible, but choosing a similar or slightly more general type is preferred. Using TYPE_UNKNOWN is allowed, but some headunits will not display any information in that case.

Parameters
type int: one of the TYPE_* static constants defined in this class.

Returns
Maneuver.Builder

Throws
IllegalArgumentException if type is not a valid maneuver type.

equals

public boolean equals (Object other)

Parameters
other Object

Returns
boolean

hashCode

public int hashCode ()

Returns
int

toString

public String toString ()

Returns
String