Route

class Route

The route represents the result of the route planning including geometry and generated instructions.

Constructors

Link copied to clipboard
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)

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

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.

Properties

Link copied to clipboard

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

Link copied to clipboard

Returns the destination of the route.

Link copied to clipboard

List containing fork points with other routes.

Link copied to clipboard

Returns all GeoPoints of this route. Route points do not contain duplicates on leg intersections.

Link copied to clipboard

The offset where incremental computation of route contents was paused.

Link copied to clipboard
val id: RouteId

Unique ID.

Link copied to clipboard

List of route legs.

Link copied to clipboard

Information about route creation and the last route update.

Link copied to clipboard

Returns the origin of the route.

Link copied to clipboard

The options used to generate this route.

Link copied to clipboard

The reason why the route was planned.

Link copied to clipboard

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

Link copied to clipboard

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

Link copied to clipboard

Information about sections of the route.

Link copied to clipboard

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

Link copied to clipboard

Returns the list of waypoints of the route.

Functions

Link copied to clipboard
fun consumptionInLegUpTo(routeOffset: Distance, withAuxPower: AuxiliaryPower? = null): Result<Consumption>

Calculates the electric energy used up to routeOffset, starting from the preceding waypoint or origin.

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean

Checks if this Route object is equal to another object.

Link copied to clipboard
open override fun hashCode(): Int

Get the hash code of this route object.

Link copied to clipboard
fun remainingBudgetAt(routeOffset: Distance, withAuxPower: AuxiliaryPower? = null): Result<Consumption>

Calculates the remaining battery charge at a given distance along the route.

Link copied to clipboard
open override fun toString(): String

Returns a string representation of this Route object.

Link copied to clipboard

Calculates the travel time up to a given distance along the route.