MapboxRouteLineView
Responsible for rendering side effects produced by the MapboxRouteLineApi. The MapboxRouteLineApi class consumes route data from the Navigation SDK and produces the data necessary to visualize one or more routes on the map. This class renders the data from the MapboxRouteLineApi by calling the appropriate map related commands so that the map can have an appearance that is consistent with the state of the navigation SDK and the application.
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.
Many of the method calls execute tasks on a background thread. A cancel method is provided in this class which will cancel the background tasks.
Parameters
resource options used rendering the route line on the map
Constructors
Functions
Returns the visibility of the alternative route(s) map layer.
Returns the visibility of the primary route map layer.
Returns the visibility of the primary route map traffic layer.
Hides the layers used for the alternative route line(s).
Sets the layer containing the origin and destination icons to not visible.
Hides the layers used for the primary route line.
Hides the layers used for the traffic line(s).
Will initialize the route line related layers. Other calls in this class will initialize the layers if they have not yet been initialized. If you have a use case for initializing the layers in advance of any API calls this method may be used.
Applies side effects related to clearing the route(s) from the map.
Applies drawing related side effects.
Applies side effects related to the vanishing route line feature.
Shows the layers used for the alternative route line(s).
Sets the layer containing the origin and destination icons to visible.
Shows the layers used for the primary route line.
Shows the layers used for the traffic line(s).