RouteOptions

data class RouteOptions(val geometry: List<GeoPoint>, @ColorInt val color: Int = DEFAULT_COLOR, @FloatRange(from = 0.0) val outlineWidth: Double = DEFAULT_OUTLINE_WIDTH, val widths: List<WidthByZoom> = DEFAULT_WIDTHS, val visible: Boolean = true, val progress: Distance = Distance.ZERO, val instructions: List<Instruction> = emptyList(), val tag: String? = null, val departureMarkerVisible: Boolean = false, val destinationMarkerVisible: Boolean = false, val followable: Boolean = false, val routeOffset: List<Distance> = emptyList(), val sections: List<RouteSection> = emptyList(), val departureMarkerPinImage: Image? = null, val destinationMarkerPinImage: Image? = null)

Configures options for a Route representation which can be added and displayed on the map. See TomTomMap.addRoute(routeOptions: RouteOptions).

Important: This is a Public Preview API. It may be changed or removed at any time.

Constructors

Link copied to clipboard
constructor(geometry: List<GeoPoint>, @ColorInt color: Int = 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(), sections: List<RouteSection> = emptyList(), departureMarkerPinImage: Image? = null, destinationMarkerPinImage: Image? = null)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
val color: Int

Color of the route tube.

Link copied to clipboard

Image that will be used as the departure marker pin. If you pass null, the default image is used.

Link copied to clipboard

Determines the visibility of the departure marker.

Link copied to clipboard

Image that will be used as the destination marker pin. If you pass null, the default image is used.

Link copied to clipboard

Determines the visibility of the destination marker.

Link copied to clipboard
val followable: Boolean = false

Determines whether this Route is followable or not.

Link copied to clipboard

Geometry of the Route.

Link copied to clipboard

List of Instruction for maneuvers along the Route.

Link copied to clipboard

Width of the route outline in density-independent pixels (dp).

Link copied to clipboard

Sets the route progress. The internal map mechanism automatically renders the driven route section in a slightly different color which brings a pleasant user experience.

Link copied to clipboard

List of Distance for route progress values along the Route.

Link copied to clipboard

Information about sections on the route.

Link copied to clipboard
val tag: String? = null

Optional holder for custom extra information about the requested Route.

Link copied to clipboard
val visible: Boolean = true

Determines the visibility of the Route.

Link copied to clipboard

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.