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
When true
the blur effect will express the same colors used for traffic. The blur effect option must be enabled in order for this option to take effect.
Determines if the color transition between traffic congestion changes should use a soft gradient appearance or abrupt color change. This is false by default.
Configuration for fading out of the route line. See FadingConfig for details. If not set or set it null, the route line will be fully opaque at all zoom levels.
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.
Adds a blur effect to the route line.
Determines the opacity of the route line blur.
A width value applied to the line blur effect. See https://docs.mapbox.com/android/maps/api/11.0.0/mapbox-maps-android/com.mapbox.maps.extension.style.layers.generated/-line-layer/line-blur.html for more information.
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.