Route

data class Route(    val id: String,     val length: Distance,     val travelTime: Duration,     val trafficDelay: Duration = Duration.ZERO,     val trafficLength: Distance = Distance.ZERO,     val departureTimeWithZone: DateTime,     val arrivalTimeWithZone: DateTime,     val legs: List<RouteLeg>,     val routePoints: List<RoutePoint>,     val sections: Sections,     val batteryConsumptionInkWh: Float = 0.0f,     val fuelConsumptionInLiters: Float = 0.0f,     val routeCoordinates: List<RouteCoordinate> = emptyList())

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

Parameters

id

Unique ID.

length

Route length in meters.

travelTime

Estimated travel time.

trafficDelay

Traffic delay.

trafficLength

Traffic length.

departureTimeWithZone

Estimated departure time including time zone.

arrivalTimeWithZone

Estimated arrival time including time zone.

legs

List of route legs.

routePoints

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

sections

Information about sections of the route.

batteryConsumptionInkWh

Battery consumption for the electric cars.

fuelConsumptionInLiters

Fuels consumption for the regular cars.

routeCoordinates

Optional extended representation of the route.

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

Constructors

Link copied to clipboard
fun Route(    id: String,     length: Distance,     travelTime: Duration,     trafficDelay: Duration = Duration.ZERO,     trafficLength: Distance = Distance.ZERO,     departureTimeWithZone: DateTime,     arrivalTimeWithZone: DateTime,     legs: List<RouteLeg>,     routePoints: List<RoutePoint>,     sections: Sections,     batteryConsumptionInkWh: Float = 0.0f,     fuelConsumptionInLiters: Float = 0.0f,     routeCoordinates: List<RouteCoordinate> = emptyList())

Properties

Link copied to clipboard
val arrivalTimeWithZone: DateTime
Link copied to clipboard
val batteryConsumptionInkWh: Float = 0.0f
Link copied to clipboard
val departureTimeWithZone: DateTime
Link copied to clipboard
val endOfRoute: GeoCoordinate

The end point of the route.

Link copied to clipboard
val fuelConsumptionInLiters: Float = 0.0f
Link copied to clipboard
val geometry: List<GeoCoordinate>

Returns all GeoCoordinates of this route.

Link copied to clipboard
val id: String
Link copied to clipboard
val legs: List<RouteLeg>
Link copied to clipboard
val length: Distance
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 trafficDelay: Duration
Link copied to clipboard
val trafficLength: Distance
Link copied to clipboard
val travelTime: Duration