Maneuver
@CarProtocol
class Maneuver
Information about a maneuver that the driver will be required to perform.
Summary
Nested types |
|---|
class Maneuver.BuilderA builder of |
Constants |
|
|---|---|
const Int |
TYPE_DEPART = 1Starting point of the navigation. |
const Int |
TYPE_DESTINATION = 39Arrival at a destination. |
const Int |
Arrival to a destination located to the left side of the road. |
const Int |
Arrival to a destination located to the right side of the road. |
const Int |
Arrival to a destination located straight ahead. |
const Int |
TYPE_FERRY_BOAT = 37Drive towards a boat ferry for vehicles, where the entrance is straight ahead or in an unknown direction. |
const Int |
TYPE_FERRY_BOAT_LEFT = 47Drive towards a boat ferry for vehicles, where the entrance is to the left. |
const Int |
Drive towards a boat ferry for vehicles, where the entrance is to the right. |
const Int |
TYPE_FERRY_TRAIN = 38Drive towards a train ferry for vehicles (e.g. "Take the train"), where the entrance is straight ahead or in an unknown direction. |
const Int |
Drive towards a train ferry for vehicles (e.g. "Take the train"), where the entrance is to the left. |
const Int |
Drive towards a train ferry for vehicles (e.g. "Take the train"), where the entrance is to the right. |
const Int |
TYPE_FORK_LEFT = 25Keep to the left as the road diverges. |
const Int |
TYPE_FORK_RIGHT = 26Keep to the right as the road diverges. |
const Int |
TYPE_KEEP_LEFT = 3No turn, from 0 (included) to 10 (excluded) degrees. |
const Int |
TYPE_KEEP_RIGHT = 4No turn, from 0 (included) to 10 (excluded) degrees. |
const Int |
TYPE_MERGE_LEFT = 27Current road joins another on the left. |
const Int |
TYPE_MERGE_RIGHT = 28Current road joins another on the right. |
const Int |
Current road joins another without direction specified. |
const Int |
TYPE_NAME_CHANGE = 2No turn, but the street name changes. |
const Int |
A left turn to exit a turnpike or freeway, from 45 (included) to 135 (excluded) degrees. |
const Int |
A left right to exit a turnpike or freeway, from 45 (included) to 135 (excluded) degrees. |
const Int |
A left turn to exit a turnpike or freeway, from 10 (included) to 45 (excluded) degrees. |
const Int |
A right turn to exit a turnpike or freeway, from 10 (included) to 45 (excluded) degrees. |
const Int |
Regular left turn to enter a turnpike or freeway, from 45 (included) to 135 (excluded) degrees. |
const Int |
Regular right turn to enter a turnpike or freeway, from 45 (included) to 135 (excluded) degrees. |
const Int |
Sharp left turn to enter a turnpike or freeway, from 135 (included) to 175 (excluded) degrees. |
const Int |
Sharp right turn to enter a turnpike or freeway, from 135 (included) to 175 (excluded) degrees. |
const Int |
Slight left turn to enter a turnpike or freeway, from 10 (included) to 45 (excluded) degrees. |
const Int |
Slight right turn to enter a turnpike or freeway, from 10 (included) to 45 (excluded) degrees. |
const Int |
Left turn onto the opposite side of the same street to enter a turnpike or freeway, from 175 (included) to 180 (included). |
const Int |
Right turn onto the opposite side of the same street to enter a turnpike or freeway, from 175 (included) to 180 (included). |
const Int |
Enter a counter-clockwise roundabout and take the Nth exit. |
const Int |
Enter a counter-clockwise roundabout and take the Nth exit after angle A degrees. |
const Int |
Enter a clockwise roundabout and take the Nth exit. |
const Int |
Enter a clockwise roundabout and take the Nth exit after angle A degrees. |
const Int |
Entrance to a counter-clockwise roundabout on which the current road ends. |
const Int |
Entrance to a clockwise roundabout on which the current road ends. |
const Int |
Used when leaving a counter-clockwise roundabout when the step starts in it. |
const Int |
Used when leaving a clockwise roundabout when the step starts in it. |
const Int |
TYPE_STRAIGHT = 36Driver should steer straight. |
const Int |
Regular left turn at an intersection, from 45 (included) to 135 (excluded) degrees. |
const Int |
Regular right turn at an intersection, from 45 (included) to 135 (excluded) degrees. |
const Int |
Sharp left turn at an intersection, from 135 (included) to 175 (excluded) degrees. |
const Int |
Sharp right turn at an intersection, from 135 (included) to 175 (excluded) degrees. |
const Int |
Slight left turn at an intersection, from 10 (included) to 45 (excluded) degrees. |
const Int |
Slight right turn at an intersection, from 10 (included) to 45 (excluded) degrees. |
const Int |
TYPE_UNKNOWN = 0Maneuver type is unknown, no maneuver information should be displayed. |
const Int |
TYPE_U_TURN_LEFT = 11Left turn onto the opposite side of the same street, from 175 (included) to 180 (included) degrees. |
const Int |
TYPE_U_TURN_RIGHT = 12A right turn onto the opposite side of the same street, from 175 (included) to 180 (included) degrees. |
Public functions |
|
|---|---|
Boolean |
|
CarIcon? |
getIcon()Returns the icon for the maneuver. |
Int |
Returns the roundabout exit angle in degrees to designate the amount of distance to travel around the roundabout. |
Int |
Returns the roundabout exit number, starting from 1 to designate the first exit after joining the roundabout, and increasing in circulation order. |
Int |
getType()Returns the maneuver type. |
Int |
hashCode() |
String |
toString() |
Constants
TYPE_DEPART
const val TYPE_DEPART = 1: Int
Starting point of the navigation.
For example, "Start driving on Main St."
TYPE_DESTINATION_LEFT
const val TYPE_DESTINATION_LEFT = 41: Int
Arrival to a destination located to the left side of the road.
TYPE_DESTINATION_RIGHT
const val TYPE_DESTINATION_RIGHT = 42: Int
Arrival to a destination located to the right side of the road.
TYPE_DESTINATION_STRAIGHT
const val TYPE_DESTINATION_STRAIGHT = 40: Int
Arrival to a destination located straight ahead.
TYPE_FERRY_BOAT
const val TYPE_FERRY_BOAT = 37: Int
Drive towards a boat ferry for vehicles, where the entrance is straight ahead or in an unknown direction.
For example, this is used to indicate "Take the ferry".
TYPE_FERRY_BOAT_LEFT
const val TYPE_FERRY_BOAT_LEFT = 47: Int
Drive towards a boat ferry for vehicles, where the entrance is to the left.
For example, this is used to indicate "Take the ferry".
TYPE_FERRY_BOAT_RIGHT
const val TYPE_FERRY_BOAT_RIGHT = 48: Int
Drive towards a boat ferry for vehicles, where the entrance is to the right.
For example, this is used to indicate "Take the ferry".
TYPE_FERRY_TRAIN
const val TYPE_FERRY_TRAIN = 38: Int
Drive towards a train ferry for vehicles (e.g. "Take the train"), where the entrance is straight ahead or in an unknown direction.
TYPE_FERRY_TRAIN_LEFT
const val TYPE_FERRY_TRAIN_LEFT = 49: Int
Drive towards a train ferry for vehicles (e.g. "Take the train"), where the entrance is to the left.
TYPE_FERRY_TRAIN_RIGHT
const val TYPE_FERRY_TRAIN_RIGHT = 50: Int
Drive towards a train ferry for vehicles (e.g. "Take the train"), where the entrance is to the right.
TYPE_FORK_LEFT
const val TYPE_FORK_LEFT = 25: Int
Keep to the left as the road diverges.
For example, this is used to indicate "Keep left at the fork".
TYPE_FORK_RIGHT
const val TYPE_FORK_RIGHT = 26: Int
Keep to the right as the road diverges.
For example, this is used to indicate "Keep right at the fork".
TYPE_KEEP_LEFT
const val TYPE_KEEP_LEFT = 3: Int
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.
TYPE_KEEP_RIGHT
const val TYPE_KEEP_RIGHT = 4: Int
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.
TYPE_MERGE_LEFT
const val TYPE_MERGE_LEFT = 27: Int
Current road joins another on the left.
For example, this is used to indicate "Merge left onto Main St.".
TYPE_MERGE_RIGHT
const val TYPE_MERGE_RIGHT = 28: Int
Current road joins another on the right.
For example, this is used to indicate "Merge left onto Main St.".
TYPE_MERGE_SIDE_UNSPECIFIED
const val TYPE_MERGE_SIDE_UNSPECIFIED = 29: Int
Current road joins another without direction specified.
For example, this is used to indicate "Merge onto Main St.".
TYPE_NAME_CHANGE
const val TYPE_NAME_CHANGE = 2: Int
No turn, but the street name changes.
For example, "Continue on Main St."
TYPE_OFF_RAMP_NORMAL_LEFT
const val TYPE_OFF_RAMP_NORMAL_LEFT = 23: Int
A left turn to exit a turnpike or freeway, from 45 (included) to 135 (excluded) degrees.
TYPE_OFF_RAMP_NORMAL_RIGHT
const val TYPE_OFF_RAMP_NORMAL_RIGHT = 24: Int
A left right to exit a turnpike or freeway, from 45 (included) to 135 (excluded) degrees.
TYPE_OFF_RAMP_SLIGHT_LEFT
const val TYPE_OFF_RAMP_SLIGHT_LEFT = 21: Int
A left turn to exit a turnpike or freeway, from 10 (included) to 45 (excluded) degrees.
TYPE_OFF_RAMP_SLIGHT_RIGHT
const val TYPE_OFF_RAMP_SLIGHT_RIGHT = 22: Int
A right turn to exit a turnpike or freeway, from 10 (included) to 45 (excluded) degrees.
TYPE_ON_RAMP_NORMAL_LEFT
const val TYPE_ON_RAMP_NORMAL_LEFT = 15: Int
Regular left turn to enter a turnpike or freeway, from 45 (included) to 135 (excluded) degrees.
TYPE_ON_RAMP_NORMAL_RIGHT
const val TYPE_ON_RAMP_NORMAL_RIGHT = 16: Int
Regular right turn to enter a turnpike or freeway, from 45 (included) to 135 (excluded) degrees.
TYPE_ON_RAMP_SHARP_LEFT
const val TYPE_ON_RAMP_SHARP_LEFT = 17: Int
Sharp left turn to enter a turnpike or freeway, from 135 (included) to 175 (excluded) degrees.
TYPE_ON_RAMP_SHARP_RIGHT
const val TYPE_ON_RAMP_SHARP_RIGHT = 18: Int
Sharp right turn to enter a turnpike or freeway, from 135 (included) to 175 (excluded) degrees.
TYPE_ON_RAMP_SLIGHT_LEFT
const val TYPE_ON_RAMP_SLIGHT_LEFT = 13: Int
Slight left turn to enter a turnpike or freeway, from 10 (included) to 45 (excluded) degrees.
TYPE_ON_RAMP_SLIGHT_RIGHT
const val TYPE_ON_RAMP_SLIGHT_RIGHT = 14: Int
Slight right turn to enter a turnpike or freeway, from 10 (included) to 45 (excluded) degrees.
TYPE_ON_RAMP_U_TURN_LEFT
const val TYPE_ON_RAMP_U_TURN_LEFT = 19: Int
Left turn onto the opposite side of the same street to enter a turnpike or freeway, from 175 (included) to 180 (included).
TYPE_ON_RAMP_U_TURN_RIGHT
const val TYPE_ON_RAMP_U_TURN_RIGHT = 20: Int
Right turn onto the opposite side of the same street to enter a turnpike or freeway, from 175 (included) to 180 (included).
TYPE_ROUNDABOUT_ENTER_AND_EXIT_CCW
const val TYPE_ROUNDABOUT_ENTER_AND_EXIT_CCW = 34: Int
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".
TYPE_ROUNDABOUT_ENTER_AND_EXIT_CCW_WITH_ANGLE
const val TYPE_ROUNDABOUT_ENTER_AND_EXIT_CCW_WITH_ANGLE = 35: Int
Enter a counter-clockwise roundabout and take the Nth exit after angle A degrees.
The exit angle must be passed when creating the maneuver.
For example, this is used to indicate "At the roundabout, take a sharp right at 35 degrees".
TYPE_ROUNDABOUT_ENTER_AND_EXIT_CW
const val TYPE_ROUNDABOUT_ENTER_AND_EXIT_CW = 32: Int
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".
TYPE_ROUNDABOUT_ENTER_AND_EXIT_CW_WITH_ANGLE
const val TYPE_ROUNDABOUT_ENTER_AND_EXIT_CW_WITH_ANGLE = 33: Int
Enter a clockwise roundabout and take the Nth exit after angle A degrees.
The exit angle must be passed when creating the maneuver.
For example, this is used to indicate "At the roundabout, take the exit at 135 degrees".
TYPE_ROUNDABOUT_ENTER_CCW
const val TYPE_ROUNDABOUT_ENTER_CCW = 45: Int
Entrance to a counter-clockwise roundabout on which the current road ends.
For example, this is used to indicate "Enter the roundabout".
TYPE_ROUNDABOUT_ENTER_CW
const val TYPE_ROUNDABOUT_ENTER_CW = 43: Int
Entrance to a clockwise roundabout on which the current road ends.
For example, this is used to indicate "Enter the roundabout".
TYPE_ROUNDABOUT_EXIT_CCW
const val TYPE_ROUNDABOUT_EXIT_CCW = 46: Int
Used when leaving a counter-clockwise roundabout when the step starts in it.
For example, this is used to indicate "Exit the roundabout".
TYPE_ROUNDABOUT_EXIT_CW
const val TYPE_ROUNDABOUT_EXIT_CW = 44: Int
Used when leaving a clockwise roundabout when the step starts in it.
For example, this is used to indicate "Exit the roundabout".
TYPE_TURN_NORMAL_LEFT
const val TYPE_TURN_NORMAL_LEFT = 7: Int
Regular left turn at an intersection, from 45 (included) to 135 (excluded) degrees.
TYPE_TURN_NORMAL_RIGHT
const val TYPE_TURN_NORMAL_RIGHT = 8: Int
Regular right turn at an intersection, from 45 (included) to 135 (excluded) degrees.
TYPE_TURN_SHARP_LEFT
const val TYPE_TURN_SHARP_LEFT = 9: Int
Sharp left turn at an intersection, from 135 (included) to 175 (excluded) degrees.
TYPE_TURN_SHARP_RIGHT
const val TYPE_TURN_SHARP_RIGHT = 10: Int
Sharp right turn at an intersection, from 135 (included) to 175 (excluded) degrees.
TYPE_TURN_SLIGHT_LEFT
const val TYPE_TURN_SLIGHT_LEFT = 5: Int
Slight left turn at an intersection, from 10 (included) to 45 (excluded) degrees.
TYPE_TURN_SLIGHT_RIGHT
const val TYPE_TURN_SLIGHT_RIGHT = 6: Int
Slight right turn at an intersection, from 10 (included) to 45 (excluded) degrees.
TYPE_UNKNOWN
const val TYPE_UNKNOWN = 0: Int
Maneuver type is unknown, no maneuver information should be displayed.
This type 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.
TYPE_U_TURN_LEFT
const val TYPE_U_TURN_LEFT = 11: Int
Left turn onto the opposite side of the same street, from 175 (included) to 180 (included) degrees.
TYPE_U_TURN_RIGHT
const val TYPE_U_TURN_RIGHT = 12: Int
A right turn onto the opposite side of the same street, from 175 (included) to 180 (included) degrees.
Public functions
getIcon
fun getIcon(): CarIcon?
Returns the icon for the maneuver.
Optional field that when not set may be shown in the target display by a generic image representing the specific maneuver.
getRoundaboutExitAngle
fun getRoundaboutExitAngle(): Int
Returns the roundabout exit angle in degrees to designate the amount of distance to travel around the roundabout. Only relevant if the type is TYPE_ROUNDABOUT_ENTER_AND_EXIT_CW_WITH_ANGLE or TYPE_ROUNDABOUT_ENTER_AND_EXIT_CCW_WITH_ANGLE.
For example, if the drive is joining a counter-clockwise roundabout with equally spaced exits then the exit to the right would be at 90 degrees, the one straight ahead would be at 180 degrees, the one to the left would at 270 degrees and the one used by the driver to join the roundabout would be at 360 degrees.
The angle can also be set for irregular roundabouts. For example a roundabout with three exits at 90, 270 and 360 degrees could also have the desired exit angle specified.
Required with the type is a roundabout with an angle.
getRoundaboutExitNumber
fun getRoundaboutExitNumber(): Int
Returns the roundabout exit number, starting from 1 to designate the first exit after joining the roundabout, and increasing in circulation order. Only relevant if the type is any variation of TYPE_ROUNDABOUT_ENTER_AND_EXIT_*.
For example, if the driver is joining a counter-clockwise roundabout with 4 exits, then the exit to the right would be exit #1, the one straight ahead would be exit #2, the one to the left would be exit #3 and the one used by the driver to join the roundabout would be exit #4.
Required when the type is a roundabout.