public class StepManeuver
extends java.lang.Object
LegStep.| Constructor and Description |
|---|
StepManeuver()
Empty constructor.
|
StepManeuver(java.lang.String type,
java.lang.String modifier,
java.lang.Integer exit)
Constructor taking in a
type, modifier, and an integer exit value. |
| Modifier and Type | Method and Description |
|---|---|
com.mapbox.services.commons.models.Position |
asPosition()
Converts double array
getLocation() to a Position. |
double |
getBearingAfter()
Number between 0 and 360 indicating the clockwise angle from true north to the direction of
travel right after the maneuver.
|
double |
getBearingBefore()
Number between 0 and 360 indicating the clockwise angle from true north to the direction of
travel right before the maneuver.
|
java.lang.Integer |
getExit()
An optional integer indicating number of the exit to take.
|
java.lang.String |
getInstruction()
A human-readable instruction of how to execute the returned maneuver.
|
double[] |
getLocation()
an array with two double values reresenting the maneuver locations coordinate.
|
java.lang.String |
getModifier()
This indicates the mode of the maneuver.
|
java.lang.String |
getType()
This indicates the type of maneuver.
|
void |
setBearingAfter(double bearingAfter)
Number between 0 and 360 indicating the clockwise angle from true north to the direction of
travel right after the maneuver.
|
void |
setBearingBefore(double bearingBefore)
Number between 0 and 360 indicating the clockwise angle from true north to the direction of
travel right before the maneuver.
|
void |
setExit(java.lang.Integer exit)
An optional integer indicating number of the exit to take.
|
void |
setInstruction(java.lang.String instruction)
A human-readable instruction of how to execute the returned maneuver.
|
void |
setLocation(double[] location)
Sets double array of [longitude, latitude] for the snapped coordinate.
|
void |
setModifier(java.lang.String modifier)
This indicates the mode of the maneuver.
|
void |
setType(java.lang.String type)
This indicates the type of maneuver.
|
java.lang.String |
toString()
Offers a convenient string with all the
StepManeuver variables. |
public StepManeuver()
public StepManeuver(java.lang.String type,
java.lang.String modifier,
java.lang.Integer exit)
type, modifier, and an integer exit value.type - indicates the type of maneuver. It can be any of these listed:modifier - indicates the mode of the maneuver.exit - integer indicating number of the exit to take.public double[] getLocation()
public void setLocation(double[] location)
location - array with the order [longitude, latitude].public double getBearingBefore()
public void setBearingBefore(double bearingBefore)
bearingBefore - a double with value from 0 to 360 representing the bearing before the maneuver.public double getBearingAfter()
public void setBearingAfter(double bearingAfter)
bearingAfter - a double with value from 0 to 360 representing the bearing after the maneuver.public java.lang.String getType()
public void setType(java.lang.String type)
getType().type - a String with type of maneuver.public java.lang.Integer getExit()
else - indicates the number of intersections passed until the turn. roundabout - traverse roundabout rotary - a traffic circle
public void setExit(java.lang.Integer exit)
else - indicates the number of intersections passed until the turn. roundabout - traverse roundabout rotary - a traffic circle
exit - a String of an integer indicating number of the exit to take.public java.lang.String getModifier()
public void setModifier(java.lang.String modifier)
modifier - a String with the modifier.public java.lang.String getInstruction()
public void setInstruction(java.lang.String instruction)
instruction - a String with instruction representing how to execute the maneuver.public com.mapbox.services.commons.models.Position asPosition()
getLocation() to a Position. You'll typically want to
use this format instead of getLocation() as it's easier to work with.Position.public java.lang.String toString()
StepManeuver variables.toString in class java.lang.ObjectStepManeuver information within.