RouteOptions

fun RouteOptions(geometry: List<GeoPoint>, color: Color = DEFAULT_COLOR, @FloatRange(from = 0.0) outlineWidth: Double = DEFAULT_OUTLINE_WIDTH, widths: List<WidthByZoom> = DEFAULT_WIDTHS, visible: Boolean = true, progress: Distance = Distance.ZERO, instructions: List<Instruction> = emptyList(), tag: String? = null, departureMarkerVisible: Boolean = false, destinationMarkerVisible: Boolean = false, followable: Boolean = false, routeOffset: List<Distance> = emptyList())

Parameters

geometry

Geometry of the Route.

color

Color of the route tube.

outlineWidth

Width of the route outline.

widths

Widths of the route tube for different zoom levels. If the same width should be applied for all zoom levels, then the zoom value can be skipped in the WidthByZoom initialization.

visible

Determines the visibility of the Route.

progress

Sets the route progress in meters. The internal map mechanism automatically renders the driven route part in a slightly different color what brings a nice user experience.

instructions

List of Instruction for maneuvers along the Route.

tag

Optional holder for custom extra information about the requested Route.

departureMarkerVisible

Determines the visibility of the default departure marker.

destinationMarkerVisible

Determines the visibility of the default destination marker.

followable

Determines whether this Route is followable or not.

routeOffset

List of Distance for route progress values along the Route.

A followable route is eligible to be followed by CameraTrackingMode.FOLLOW_ROUTE. Only one Route can be followed at a time. When newly added route is marked as followable, the previous one stops being followable.