LaneDirection

public final class LaneDirection
extends Object

java.lang.Object
   ↳ androidx.car.app.navigation.model.LaneDirection


Defines the possible directions a driver can go when using a particular lane at a particular step in the navigation.

These directions can be combined and sent to the host to display a lane configuration to the user.

See also:

Summary

Constants

int SHAPE_NORMAL_LEFT

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

int SHAPE_NORMAL_RIGHT

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

int SHAPE_SHARP_LEFT

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

int SHAPE_SHARP_RIGHT

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

int SHAPE_SLIGHT_LEFT

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

int SHAPE_SLIGHT_RIGHT

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

int SHAPE_STRAIGHT

No turn.

int SHAPE_UNKNOWN

The shape is unknown, in which case no lane information should be shown.

int SHAPE_U_TURN_LEFT

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

int SHAPE_U_TURN_RIGHT

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

Public methods

static LaneDirection create(int shape, boolean isRecommended)

Constructs a new instance of a LaneDirection.

boolean equals(Object other)
int getShape()

Returns shape of this lane direction.

int hashCode()
boolean isRecommended()

Returns whether this is a direction the driver should take in order to stay on the navigation route.

String toString()

Inherited methods