Builder

class Builder(context: Context)

A builder used to create instance of MapboxRouteLineViewOptions.

Parameters

context

context

Constructors

Link copied to clipboard
constructor(context: Context)

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
Link copied to clipboard

The drawable id for representing the destination icon.

Link copied to clipboard

Indicates if the route line will display restricted road sections with a dashed line. Note that in order for restricted sections to be displayed, you also need to set MapboxRouteLineApiOptions.calculateRestrictedRoadSections to true, so that the necessary data is calculated. You can have a set-up when some of your MapboxRouteLineViews display the restricted sections and the other don't. I that case set MapboxRouteLineViewOptions.displayRestrictedRoadSections to true for those views that will display restricted sections and set MapboxRouteLineApiOptions.calculateRestrictedRoadSections to true if at least one of your views will display them.

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. NOTE: this property guards fading out the route line on transition from a lower to a higher zoom level, meaning that FadingConfig.startFadingZoom must be less than or equal to FadingConfig.finishFadingZoom.

Link copied to clipboard
fun iconPitchAlignment(iconPitchAlignment: IconPitchAlignment): MapboxRouteLineViewOptions.Builder

The pitch alignment value used for waypoint icons. The default is IconPitchAlignment.MAP.

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

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

The drawable id for representing the origin icon.

Link copied to clipboard

The dash array for the LineLayer used for displaying restricted roads.

Link copied to clipboard

The width of the restricted road LineLayer.

Link copied to clipboard

The opacity of the restricted road LineLayer.

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

When enabled a blur effect is applied to the line blur. The blur can be a single color or can express the traffic colors.

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

Enable route line's GeoJson source data sharing between multiple instances of the map. If this option is enabled for multiple instances of MapboxRouteLineViews that are used to draw route lines on multiple maps at the same time, they will all share the GeoJson source to optimize execution time of updates and decrease the memory footprint. Enable only for instances that should share the geometry of the lines, leave disabled for instances that should draw geometries distinct from other instances.

Link copied to clipboard

The slot name to use for route line position in the layer stack.

Link copied to clipboard

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

Link copied to clipboard

The tolerance value used when configuring the underlying map source.

Link copied to clipboard
fun waypointLayerIconAnchor(waypointLayerIconAnchor: IconAnchor): MapboxRouteLineViewOptions.Builder

The anchor value, the default is IconAnchor.CENTER.

Link copied to clipboard

The list of offset values for waypoint icons.