MapRouteOptions

class MapRouteOptions(val geometry: List<Coordinate> = emptyList(), val links: List<MapRouteOptions.LinkInfo> = emptyList(), val linkGrouped: List<MutableList<MapRouteOptions.LinkInfo>> = emptyList(), var progress: Double = 0.0, var instructions: List<MapRouteOptions.Instruction> = emptyList(), val tag: String? = null, val departure: Coordinate? = null, val destination: Coordinate? = null, var routeColor: String = MapRouteColor.BLUE.hexColor, val distance: Double, var isSelected: Boolean = true) : MapShape

A class that defines options for displaying a route on the map.

It contains information such as the route's geometry, origin/destination points, color, and guidance instructions. This class is used when adding a route line to the map.

Constructors

Link copied to clipboard
constructor(geometry: List<Coordinate> = emptyList(), links: List<MapRouteOptions.LinkInfo> = emptyList(), linkGrouped: List<MutableList<MapRouteOptions.LinkInfo>> = emptyList(), progress: Double = 0.0, instructions: List<MapRouteOptions.Instruction> = emptyList(), tag: String? = null, departure: Coordinate? = null, destination: Coordinate? = null, routeColor: String = MapRouteColor.BLUE.hexColor, distance: Double, isSelected: Boolean = true)

Types

Link copied to clipboard
data class Instruction(val routeOffset: Double = 0.0, val length: Double = 20.0, val combineWithNext: Boolean = false)
Link copied to clipboard
data class LinkInfo(val distance: Double = 0.0, val trafficColor: String = MapRouteColor.GRAY.hexColor)

Properties

Link copied to clipboard
val departure: Coordinate? = null

The coordinates of the departure point.

Link copied to clipboard
val destination: Coordinate? = null

The coordinates of the destination point.

Link copied to clipboard
val distance: Double

The total distance of the route in meters.

Link copied to clipboard
val geometry: List<Coordinate>

The list of coordinates that form the route's geometry.

Link copied to clipboard

A list of turn-by-turn instructions for the route.

Link copied to clipboard
var isSelected: Boolean
Link copied to clipboard
val linkGrouped: List<MutableList<MapRouteOptions.LinkInfo>>
Link copied to clipboard
Link copied to clipboard
var progress: Double

The current progress state along the route.

Link copied to clipboard
var routeColor: String

The color of the route line as a hex string. Defaults to blue ('#1AA5E0').

Link copied to clipboard
val tag: String? = null

A tag used to identify and distinguish the route.