Constructor and Description |
---|
StepManeuver()
Empty constructor.
|
StepManeuver(String type,
String modifier,
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.
|
Integer |
getExit()
An optional integer indicating number of the exit to take.
|
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.
|
String |
getModifier()
This indicates the mode of the maneuver.
|
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(Integer exit)
An optional integer indicating number of the exit to take.
|
void |
setInstruction(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(String modifier)
This indicates the mode of the maneuver.
|
void |
setType(String type)
This indicates the type of maneuver.
|
String |
toString()
Offers a convenient string with all the
StepManeuver variables. |
public StepManeuver()
public StepManeuver(String type, String modifier, 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 String getType()
public void setType(String type)
getType()
.type
- a String with type of maneuver.public Integer getExit()
else - indicates the number of intersections passed until the turn. roundabout - traverse roundabout rotary - a traffic circle
public void setExit(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 String getModifier()
public void setModifier(String modifier)
modifier
- a String with the modifier.public String getInstruction()
public void setInstruction(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 String toString()
StepManeuver
variables.toString
in class Object
StepManeuver
information within.© 2015–2016 Mapbox. All rights reserved.