Builder

open class Builder

The Builder of NavigationMapRoute.

Constructors

Builder
Link copied to clipboard
open fun Builder(mapView: MapView, mapboxMap: MapboxMap, lifecycleOwner: LifecycleOwner)
Instantiates a new Builder.

Functions

build
Link copied to clipboard
open fun build(): NavigationMapRoute
Build an instance of NavigationMapRoute
withBelowLayer
Link copied to clipboard
open fun withBelowLayer(belowLayer: String): NavigationMapRoute.Builder
BelowLayer optionally pass in a layer id to place the route line below
withMapboxNavigation
Link copied to clipboard
open fun withMapboxNavigation(navigation: MapboxNavigation): NavigationMapRoute.Builder
An instance of the MapboxNavigation object.
withRouteClickPadding
Link copied to clipboard
open fun withRouteClickPadding(padding: Float): NavigationMapRoute.Builder
Indicates the size of the bounding box used to determine which route line was clicked.
withRouteLineInitializedCallback
Link copied to clipboard
open fun withRouteLineInitializedCallback(routeLineInitializedCallback: MapRouteLineInitializedCallback): NavigationMapRoute.Builder
Indicate that the route line layer has been added to the current style
withRouteStyleDescriptors
Link copied to clipboard
open fun withRouteStyleDescriptors(routeStyleDescriptors: List<RouteStyleDescriptor>): NavigationMapRoute.Builder
RouteStyleDescriptors can be used for programmatically styling the route lines.
withSourceMaxZoom
Link copied to clipboard
open fun withSourceMaxZoom(sourceMaxZoom: Int): NavigationMapRoute.Builder
Maximum zoom level at which to route line tiles are created and over-zoomed otherwise(higher means greater detail at high zoom levels).Defaults to 16.
withSourceTolerance
Link copied to clipboard
open fun withSourceTolerance(sourceTolerance: Float): NavigationMapRoute.Builder
Douglas-Peucker simplification tolerance (higher means simpler geometries and faster performance)for the GeoJsonSources created to display the route line.Defaults to 0.375.
withStyle
Link copied to clipboard
open fun withStyle(styleRes: Int): NavigationMapRoute.Builder
Style resource with custom route colors, scale, etc.
open fun withVanishingRouteLineUpdateIntervalNano(vanishingRouteLineUpdateIntervalNano: Long): NavigationMapRoute.Builder
Set minimum update interval (in nanoseconds) of the vanishing point when enabled.
withVanishRouteLineEnabled
Link copied to clipboard
open fun withVanishRouteLineEnabled(enabled: Boolean): NavigationMapRoute.Builder
determines if the route line should vanish behind the puckduring navigation.