BannerInstructions

@Serializable
data class BannerInstructions(val distanceAlongGeometry: Double, val primary: BannerText, val secondary: BannerText? = null, val sub: BannerText? = null, val view: BannerView? = null)

Visual instruction information related to a particular LegStep useful for making UI elements inside your application such as banners. To receive this information, your request must MapboxDirections.Builder#bannerInstructions() have set to true.

Since

3.0.0

Constructors

Link copied to clipboard
constructor(distanceAlongGeometry: Double, primary: BannerText, secondary: BannerText? = null, sub: BannerText? = null, view: BannerView? = null)

Types

Link copied to clipboard
class Builder(distanceAlongGeometry: Double, primary: BannerText)

Builder class for creating BannerInstructions instances.

Properties

Link copied to clipboard

Distance in meters from the beginning of the step at which the visual instruction should be visible.

Link copied to clipboard

A plain text representation stored inside a BannerText object.

Link copied to clipboard
val secondary: BannerText? = null

Ancillary visual information about the LegStep.

Link copied to clipboard
val sub: BannerText? = null

Additional information that is included if we feel the driver needs a heads up about something. Can include information about the next maneuver (the one after the upcoming one), if the step is short - can be null, or can be lane information. If we have lane information, that trumps information about the next maneuver.

Link copied to clipboard
val view: BannerView? = null

Optional image to display for an upcoming maneuver. Used to provide a visual for complex junctions and maneuver. If the step is short the image should be displayed for the duration of the step, otherwise it is shown as you approach the maneuver.

Functions

Link copied to clipboard

Creates a builder initialized with the current values of the BannerInstructions instance.