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

Link copied to clipboard

Determines if the color transition between traffic congestion changes should use a soft gradient appearance or abrupt color change. This is false by default.

Link copied to clipboard

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.

Link copied to clipboard
fun lineDepthOcclusionFactor(@FloatRange(from = 0.0, to = 1.0) lineDepthOcclusionFactor: Double): MapboxRouteLineViewDynamicOptionsBuilder

Factor that decreases line layer opacity based on occlusion from 3D objects. Value 0 disables occlusion, value 1 means fully occluded.

Link copied to clipboard

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.

Link copied to clipboard

An instance of RouteLineColorResources. Contains information about colors used for route line.

Link copied to clipboard

An instance of RouteLineScaleExpressions. Contains information about custom scaling expressions.

Link copied to clipboard

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:

Link copied to clipboard

Influences the length of the color transition when the displaySoftGradientForTraffic parameter is true.