Builder

class Builder

A builder used to create instance of MapboxRouteLineApiOptions.

Constructors

Link copied to clipboard
fun Builder()

Functions

Link copied to clipboard
fun build(): MapboxRouteLineApiOptions

Builds an instance of MapboxRouteLineApiOptions.

Link copied to clipboard
fun calculateRestrictedRoadSections(calculateRestrictedRoadSections: Boolean): MapboxRouteLineApiOptions.Builder

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 MapboxRouteLineViewOptions.displayRestrictedRoadSections to true for those views that will display restricted sections. Set MapboxRouteLineApiOptions.calculateRestrictedRoadSections to true if at least one of your views will display them.

Link copied to clipboard
fun heavyCongestionRange(range: IntRange): MapboxRouteLineApiOptions.Builder

The range for heavy traffic congestion

Link copied to clipboard
fun lowCongestionRange(range: IntRange): MapboxRouteLineApiOptions.Builder

The range for low traffic congestion

Link copied to clipboard

The range for moderate traffic congestion

Link copied to clipboard
fun severeCongestionRange(range: IntRange): MapboxRouteLineApiOptions.Builder

The range for severe traffic congestion

Link copied to clipboard

Enabling this feature will change the color of the route legs that aren't currently being navigated. See RouteLineColorResources to specify the color used. Enabling this feature when vanishingRouteLineEnabled is true can have negative performance implications, especially for long routes.

Link copied to clipboard
fun trafficBackfillRoadClasses(roadClasses: List<String>): MapboxRouteLineApiOptions.Builder

For map styles that have been configured to substitute the low traffic congestion color for unknown traffic conditions for specified road classes, the same road classes can be specified here to make the same substitution on the route line.

Link copied to clipboard
fun vanishingRouteLineEnabled(isEnabled: Boolean): MapboxRouteLineApiOptions.Builder

Indicates if the vanishing route line feature is enabled.

Link copied to clipboard

Can be used to decrease the frequency of the vanishing route line updates improving the performance at the expense of visual appearance of the vanishing point on the line during navigation.