RouteLegProgress

class 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 current step

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.

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.

Properties

Link copied to clipboard
val currentStepProgress: RouteStepProgress?
Link copied to clipboard
val distanceRemaining: Float
Link copied to clipboard
val distanceTraveled: Float
Link copied to clipboard
val durationRemaining: Double
Link copied to clipboard
val fractionTraveled: Float
Link copied to clipboard
val geometryIndex: Int
Link copied to clipboard
val legDestination: LegWaypoint?
Link copied to clipboard
val legIndex: Int
Link copied to clipboard
val routeLeg: RouteLeg?
Link copied to clipboard
val upcomingStep: LegStep?