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

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.

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

Adds a blur effect to the route line.

Link copied to clipboard

Determines the opacity of the route line blur.

Link copied to clipboard

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.

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.