LaneDirection
@CarProtocol
class 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 | |
|---|---|
Lane |
Summary
Constants |
|
|---|---|
const Int |
Regular left turn, from 45 (included) to 135 (excluded) degrees. |
const Int |
Regular right turn, from 45 (included) to 135 (excluded) degrees. |
const Int |
SHAPE_SHARP_LEFT = 7Sharp left turn, from 135 (included) to 175 (excluded) degrees. |
const Int |
Sharp right turn, from 135 (included) to 175 (excluded) degrees. |
const Int |
Slight left turn, from 10 (included) to 45 (excluded) degrees. |
const Int |
Slight right turn, from 10 (included) to 45 (excluded) degrees. |
const Int |
SHAPE_STRAIGHT = 2No turn. |
const Int |
SHAPE_UNKNOWN = 1The shape is unknown, in which case no lane information should be shown. |
const Int |
A left turn onto the opposite side of the same street, from 175 (included) to 180 (included) degrees |
const Int |
SHAPE_U_TURN_RIGHT = 10A right turn onto the opposite side of the same street, from 175 (included) to 180 (included) degrees |
Public functions |
|
|---|---|
java-static LaneDirection |
Constructs a new instance of a |
Boolean |
|
Int |
getShape()Returns shape of this lane direction. |
Int |
hashCode() |
Boolean |
Returns whether this is a direction the driver should take in order to stay on the navigation route. |
String |
toString() |
Constants
SHAPE_NORMAL_LEFT
const val SHAPE_NORMAL_LEFT = 5: Int
Regular left turn, from 45 (included) to 135 (excluded) degrees.
SHAPE_NORMAL_RIGHT
const val SHAPE_NORMAL_RIGHT = 6: Int
Regular right turn, from 45 (included) to 135 (excluded) degrees.
SHAPE_SHARP_LEFT
const val SHAPE_SHARP_LEFT = 7: Int
Sharp left turn, from 135 (included) to 175 (excluded) degrees.
SHAPE_SHARP_RIGHT
const val SHAPE_SHARP_RIGHT = 8: Int
Sharp right turn, from 135 (included) to 175 (excluded) degrees.
SHAPE_SLIGHT_LEFT
const val SHAPE_SLIGHT_LEFT = 3: Int
Slight left turn, from 10 (included) to 45 (excluded) degrees.
SHAPE_SLIGHT_RIGHT
const val SHAPE_SLIGHT_RIGHT = 4: Int
Slight right turn, from 10 (included) to 45 (excluded) degrees.
SHAPE_UNKNOWN
const val SHAPE_UNKNOWN = 1: Int
The shape is unknown, in which case no lane information should be shown.
SHAPE_U_TURN_LEFT
const val SHAPE_U_TURN_LEFT = 9: Int
A left turn onto the opposite side of the same street, from 175 (included) to 180 (included) degrees
SHAPE_U_TURN_RIGHT
const val SHAPE_U_TURN_RIGHT = 10: Int
A right turn onto the opposite side of the same street, from 175 (included) to 180 (included) degrees
Public functions
create
java-static fun create(shape: Int, isRecommended: Boolean): LaneDirection
Constructs a new instance of a LaneDirection.
| Parameters | |
|---|---|
shape: Int |
one of the |
isRecommended: Boolean |
indicates whether the |
isRecommended
fun isRecommended(): Boolean
Returns whether this is a direction the driver should take in order to stay on the navigation route.