RouteLegProgress

This is a progress object specific to the current leg the user is on. If there is only one leg in the directions route, much of this information will be identical to the parent RouteProgress.

The latest route leg progress object can be obtained through the RouteProgressObserver. Note that the route leg progress object's immutable.

Parameters

legIndex

Index representing the current leg the user is on. If the directions route currently in use contains more then two waypoints, the route is likely to have multiple legs representing the distance between the two points.

routeLeg

RouteLeg geometry

distanceTraveled

Total distance traveled in meters along current leg

distanceRemaining

The distance remaining in meters until the user reaches the end of the leg

durationRemaining

The duration remaining in seconds until the user reaches the end of the leg

fractionTraveled

The fraction traveled along the current leg, this is a float value between 0 and 1 and isn't guaranteed to reach 1 before the user reaches the next waypoint

currentStepProgress

RouteStepProgress object with information about the particular step the user is currently on

upcomingStep

Next/upcoming step immediately after the current step. If the user is on the last step on the last leg, this will return null since a next step doesn't exist

geometryIndex

Leg-wise index representing the geometry point that starts the segment the user is currently on, effectively this represents the index of last visited geometry point in the leg.

legDestination

the waypoint that marks the end of the current leg.

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val routeLeg: RouteLeg?
Link copied to clipboard
val upcomingStep: LegStep?

Functions

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

Regenerate whenever a change is made

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

Regenerate whenever a change is made

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

Returns a string representation of the object.