public abstract class LegStep extends DirectionsJsonObject
StepManeuver
object and travel to the following LegStep
.Modifier and Type | Class and Description |
---|---|
static class |
LegStep.Builder
This builder can be used to set the values describing the
LegStep . |
Constructor and Description |
---|
LegStep() |
Modifier and Type | Method and Description |
---|---|
abstract java.util.List<BannerInstructions> |
bannerInstructions()
If in your request you set
MapboxDirections.bannerInstructions() to true, you'll
receive a list of BannerInstructions which encompasses all information necessary for
creating a visual cue about a given LegStep . |
static LegStep.Builder |
builder()
Create a new instance of this class by using the
LegStep.Builder class. |
abstract java.lang.String |
destinations()
String with the destinations of the way along which the travel proceeds.
|
abstract double |
distance()
The distance traveled from the maneuver to the next
LegStep . |
abstract java.lang.String |
drivingSide()
The legal driving side at the location for this step.
|
abstract double |
duration()
The estimated travel time from the maneuver to the next
LegStep . |
abstract java.lang.String |
exits()
String with the exit numbers or names of the way.
|
static LegStep |
fromJson(java.lang.String json)
Create a new instance of this class by passing in a formatted valid JSON String.
|
abstract java.lang.String |
geometry()
Gives the geometry of the leg step.
|
abstract java.util.List<StepIntersection> |
intersections()
Provides a list of all the intersections connected to the current way the user is traveling
along.
|
abstract StepManeuver |
maneuver()
A
StepManeuver object that typically represents the first coordinate making up the
geometry() . |
abstract java.lang.String |
mode()
indicates the mode of transportation in the step.
|
abstract java.lang.String |
name()
String with the name of the way along which the travel proceeds.
|
abstract java.lang.String |
pronunciation()
The pronunciation hint of the way name.
|
abstract java.lang.String |
ref()
Any road designations associated with the road or path leading from this step’s maneuver to the
next step’s maneuver.
|
abstract java.lang.String |
rotaryName()
An optional string indicating the name of the rotary.
|
abstract java.lang.String |
rotaryPronunciation()
An optional string indicating the pronunciation of the name of the rotary.
|
abstract LegStep.Builder |
toBuilder()
Convert the current
LegStep to its builder holding the currently assigned
values. |
static com.google.gson.TypeAdapter<LegStep> |
typeAdapter(com.google.gson.Gson gson)
Gson type adapter for parsing Gson to this class.
|
abstract java.util.List<VoiceInstructions> |
voiceInstructions()
The voice instructions object is useful for navigation sessions providing well spoken text
instructions along with the distance from the maneuver the instructions should be said.
|
abstract double |
weight()
Specifies a decimal precision of edge weights, default value 1.
|
toJson
public static LegStep.Builder builder()
LegStep.Builder
class.LegStep.Builder
for creating a new instancepublic abstract double distance()
LegStep
.public abstract double duration()
LegStep
.@Nullable public abstract java.lang.String geometry()
@Nullable public abstract java.lang.String name()
String
representing the way along which the travel proceeds@Nullable public abstract java.lang.String ref()
@Nullable public abstract java.lang.String destinations()
@NonNull public abstract java.lang.String mode()
@Nullable public abstract java.lang.String pronunciation()
@Nullable @SerializedName(value="rotary_name") public abstract java.lang.String rotaryName()
rotary
.@Nullable @SerializedName(value="rotary_pronunciation") public abstract java.lang.String rotaryPronunciation()
rotary
.@NonNull public abstract StepManeuver maneuver()
StepManeuver
object that typically represents the first coordinate making up the
geometry()
.StepManeuver
object@Nullable public abstract java.util.List<VoiceInstructions> voiceInstructions()
@Nullable public abstract java.util.List<BannerInstructions> bannerInstructions()
MapboxDirections.bannerInstructions()
to true, you'll
receive a list of BannerInstructions
which encompasses all information necessary for
creating a visual cue about a given LegStep
.BannerInstructions
s which help display visual cues
inside your application@Nullable @SerializedName(value="driving_side") public abstract java.lang.String drivingSide()
left
or
right
.public abstract double weight()
@Nullable public abstract java.util.List<StepIntersection> intersections()
StepIntersection
representing all intersections along the step@Nullable public abstract java.lang.String exits()
public abstract LegStep.Builder toBuilder()
LegStep
to its builder holding the currently assigned
values. This allows you to modify a single property and then rebuild the object resulting in
an updated and modified LegStep
.LegStep.Builder
with the same values set to match the ones defined
in this LegStep
public static com.google.gson.TypeAdapter<LegStep> typeAdapter(com.google.gson.Gson gson)
gson
- the built Gson
objectpublic static LegStep fromJson(java.lang.String json)
json
- a formatted valid JSON string defining a LegStep