public abstract class BannerInstructions extends DirectionsJsonObject
LegStep
useful for making UI
elements inside your application such as banners. To receive this information, your request must
have MapboxDirections.bannerInstructions()
set to true.Modifier and Type | Class and Description |
---|---|
static class |
BannerInstructions.Builder
This builder can be used to set the values describing the
BannerInstructions . |
Constructor and Description |
---|
BannerInstructions() |
Modifier and Type | Method and Description |
---|---|
static BannerInstructions.Builder |
builder()
Create a new instance of this class by using the
BannerInstructions.Builder class. |
abstract double |
distanceAlongGeometry()
Distance in meters from the beginning of the step at which the visual instruction should be
visible.
|
static BannerInstructions |
fromJson(java.lang.String json)
Create a new instance of this class by passing in a formatted valid JSON String.
|
abstract BannerText |
primary()
A plain text representation stored inside a
BannerText object. |
abstract BannerText |
secondary()
Ancillary visual information about the
LegStep . |
abstract BannerText |
sub()
Additional information that is included if we feel the driver needs a heads up about something.
|
abstract BannerInstructions.Builder |
toBuilder()
Convert the current
BannerInstructions to its builder holding the currently assigned
values. |
static com.google.gson.TypeAdapter<BannerInstructions> |
typeAdapter(com.google.gson.Gson gson)
Gson type adapter for parsing Gson to this class.
|
toJson
public static BannerInstructions.Builder builder()
BannerInstructions.Builder
class.BannerInstructions.Builder
for creating a new instancepublic abstract double distanceAlongGeometry()
@Nullable public abstract BannerText primary()
BannerText
object.BannerText
object which includes text for visually displaying current step
information to the user@Nullable public abstract BannerText secondary()
LegStep
.BannerText
representing the secondary visual information@Nullable public abstract BannerText sub()
BannerText
representing the sub visual informationpublic abstract BannerInstructions.Builder toBuilder()
BannerInstructions
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 BannerInstructions
.BannerInstructions.Builder
with the same values set to match the ones defined
in this BannerInstructions
public static com.google.gson.TypeAdapter<BannerInstructions> typeAdapter(com.google.gson.Gson gson)
gson
- the built Gson
objectpublic static BannerInstructions fromJson(java.lang.String json)
json
- a formatted valid JSON string defining a BannerInstructions