MapboxRouteLineViewDynamicOptionsBuilder
Class that allows you to modify a subset of MapboxRouteLineViewOptions at runtime and set it via MapboxRouteLineView.updateDynamicOptions without recreating the instance. Note that just updating the options in MapboxRouteLineView will not re-render the route line. In order to do that, invoke:
mapboxRouteLineView.updateDynamicOptions(style, builderBlock)
mapboxRouteLineApi.getRouteDrawData {
mapboxRouteLineView.renderRouteDrawData(style, it)
}
Functions
Determines if the color transition between traffic congestion changes should use a soft gradient appearance or abrupt color change. This is false by default.
Factor that decreases line layer opacity based on occlusion from 3D objects. Value 0 disables occlusion, value 1 means fully occluded.
Determines the elevation of the route layers. Note that if you are using Mapbox Standard style, you can only specify a layer id that is added at runtime: static layer ids from the style will not be applied.
An instance of RouteLineColorResources. Contains information about colors used for route line.
An instance of RouteLineScaleExpressions. Contains information about custom scaling expressions.
Determines the position of the route layers in the map style. Adding a slot to the style can be done at runtime with code like:
Influences the length of the color transition when the displaySoftGradientForTraffic parameter is true.