MapboxRouteArrowView

Responsible for rendering state data generated by the MapboxRouteArrowApi class. The state data will alter the appearance of the maneuver arrow(s) on the map.

Each Layer added to the map by this class is a persistent layer - it will survive style changes. This means that if the data has not changed, it does not have to be manually redrawn after a style change. See Style.addPersistentStyleLayer.

Parameters

options

the options used for determining the rendering appearance and/or behavior.

If you're recreating the the MapboxRouteArrowView instance, for example to change the RouteArrowOptions, make sure that your first interaction restores the state and re-applies the options by calling MapboxRouteArrowApi.redraw and passing the result to MapboxRouteArrowView.render.

Constructors

Link copied to clipboard
constructor(options: RouteArrowOptions)

Functions

Link copied to clipboard
fun getVisibility(style: Style): Visibility?

Returns the maneuver arrow visibility.

Link copied to clipboard
fun render(style: Style, expectedValue: Expected<InvalidPointError, ArrowAddedValue>)

Renders the maneuver arrow data

fun render(style: Style, arrowAdded: ArrowAddedValue)

Renders an ArrowAddedValue

fun render(style: Style, visibilityChange: ArrowVisibilityChangeValue)

Renders an ArrowVisibilityChangeValue applying view side effects based on the data it contains.

fun render(style: Style, state: ClearArrowsValue)
fun render(style: Style, state: RemoveArrowValue)
Link copied to clipboard
fun renderManeuverUpdate(style: Style, expectedValue: Expected<InvalidPointError, UpdateManeuverArrowValue>)

Renders an Expected applying view side effects based on the data it contains.