Route

data class Route(    val id: RouteId,     val summary: Summary,     val legs: List<RouteLeg>,     val routePoints: List<RoutePoint>,     val sections: Sections,     val routeCoordinates: List<RouteCoordinate> = emptyList(),     val forkPoints: List<ForkPoint> = emptyList())

The route class contains the route to be navigated, including geometry and generated guidance messages.

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

Parameters

id

Unique ID.

summary

A collection of data fields representing the properties of the route.

legs

List of route legs.

routePoints

List containing every waypoint along the route, including origin and destination.

sections

Information about sections of the route.

routeCoordinates

Optional extended representation of the route.

forkPoints

List containing fork points with other routes.

Constructors

Link copied to clipboard
fun Route(    id: RouteId,     summary: Summary,     legs: List<RouteLeg>,     routePoints: List<RoutePoint>,     sections: Sections,     routeCoordinates: List<RouteCoordinate> = emptyList(),     forkPoints: List<ForkPoint> = emptyList())

Properties

Link copied to clipboard
val endOfRoute: GeoCoordinate

The end point of the route.

Link copied to clipboard
val forkPoints: List<ForkPoint>
Link copied to clipboard
val geometry: List<GeoCoordinate>

Returns all GeoCoordinates of this route.

Link copied to clipboard
val id: RouteId
Link copied to clipboard
val legs: List<RouteLeg>
Link copied to clipboard
val routeCoordinates: List<RouteCoordinate>
Link copied to clipboard
val routePoints: List<RoutePoint>
Link copied to clipboard
val sections: Sections
Link copied to clipboard
val startOfRoute: GeoCoordinate

The starting point of the route.

Link copied to clipboard
val summary: Summary