MapboxRouteLineOptions

class MapboxRouteLineOptions

Options for the configuration and appearance of the route line.

Parameters

resourceProvider

an instance of RouteLineResources

routeStyleDescriptors

a collection of RouteStyleDescriptor objects

originIcon

the drawable for representing the origin icon

destinationIcon

the drawable for representing the destination icon

routeLineBelowLayerId

determines the elevation of the route layers

vanishingRouteLine

an instance of the VanishingRouteLine

tolerance

the tolerance value used when configuring the underlying map source

displayRestrictedRoadSections

indicates if the route line will display restricted road sections with a dashed line

styleInactiveRouteLegsIndependently

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 vanishingRouteLine is enabled can have negative performance implications, especially for long routes.

displaySoftGradientForTraffic

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

softGradientTransition

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

vanishingRouteLineUpdateIntervalNano

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.

waypointLayerIconOffset

the list of offset values for waypoint icons

waypointLayerIconAnchor

the anchor value, the default is IconAnchor.CENTER

iconPitchAlignment

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

Types

Link copied to clipboard
class Builder

Responsible for instantiating an instance of MapboxRouteLineOptions

Functions

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean

Indicates whether some other object is "equal to" this one.

Link copied to clipboard
open override fun hashCode(): Int

Returns a hash code value for the object.

Link copied to clipboard
fun toBuilder(context: Context): MapboxRouteLineOptions.Builder
Link copied to clipboard
open override fun toString(): String

Returns a string representation of the object.

Properties

Link copied to clipboard
val destinationIcon: Drawable
Link copied to clipboard
val displayRestrictedRoadSections: Boolean = false
Link copied to clipboard
val displaySoftGradientForTraffic: Boolean = false
Link copied to clipboard
val iconPitchAlignment: IconPitchAlignment
Link copied to clipboard
val originIcon: Drawable
Link copied to clipboard
val resourceProvider: RouteLineResources
Link copied to clipboard
val routeLineBelowLayerId: String?
Link copied to clipboard
val routeStyleDescriptors: List<RouteStyleDescriptor>
Link copied to clipboard
val softGradientTransition: Double
Link copied to clipboard
val styleInactiveRouteLegsIndependently: Boolean = false
Link copied to clipboard
val tolerance: Double
Link copied to clipboard
val vanishingRouteLineUpdateIntervalNano: Long
Link copied to clipboard
val waypointLayerIconAnchor: IconAnchor
Link copied to clipboard
val waypointLayerIconOffset: List<Double>