Route

constructor(id: RouteId, summary: Summary, legs: List<RouteLeg>, routeStops: List<RouteStop>, sections: Sections, modificationHistory: RouteModificationHistory, forkPoints: List<ForkPoint> = emptyList(), guidanceProgressOffset: Distance = Distance.ZERO, computedAs: ComputedAs = ComputedAs.Primary, routePoints: List<RoutePoint> = emptyList(), planningReason: PlanningReason = PlanningReason.Requested, plannedWith: RoutePlanningOptions? = null)

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.

routeStops

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

sections

Information about sections of the route.

modificationHistory

Information about route creation and the last route update.

forkPoints

List containing fork points with other routes.

guidanceProgressOffset

The offset where incremental computation of route contents was paused.

computedAs

Defines whether it was an optimal route that was computed based on chosen parameters, or it was an alternative route.

routePoints

Optional extended representation of the route. Route points do not contain duplicates on leg intersections.

planningReason

The reason why the route was planned.

plannedWith

The options used to generate this route.


constructor(id: RouteId, summary: Summary, legs: List<RouteLeg>, routeStops: List<RouteStop>, sections: Sections, modificationHistory: RouteModificationHistory, forkPoints: List<ForkPoint> = emptyList(), guidanceProgressOffset: Distance = Distance.ZERO, computedAs: ComputedAs = ComputedAs.Primary, routePoints: List<RoutePoint> = emptyList(), planningReason: PlanningReason = PlanningReason.Requested)