RouteLegProgress

data class RouteLegProgress(val stepIndex: Int, val distanceRemaining: Double, val currentStepPoints: List<Point>?, val upcomingStepPoints: List<Point>?, val currentLegAnnotation: CurrentLegAnnotation?, val routeLeg: RouteLeg, val stepDistanceRemaining: Double, val intersections: List<StepIntersection>?, val currentIntersection: StepIntersection?, val upcomingIntersection: StepIntersection?, val intersectionDistancesAlongStep: Map<StepIntersection, Double>?)

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 either the [ProgressChangeListener] or the [MilestoneEventListener] callbacks. Note that the route leg progress object's immutable.

Since

0.1.0

Constructors

Link copied to clipboard
constructor(stepIndex: Int, distanceRemaining: Double, currentStepPoints: List<Point>?, upcomingStepPoints: List<Point>?, currentLegAnnotation: CurrentLegAnnotation?, routeLeg: RouteLeg, stepDistanceRemaining: Double, intersections: List<StepIntersection>?, currentIntersection: StepIntersection?, upcomingIntersection: StepIntersection?, intersectionDistancesAlongStep: Map<StepIntersection, Double>?)

Properties

Link copied to clipboard

Provides the current annotation data for a leg segment determined by the distance traveled along the route.

Link copied to clipboard

Returns the current step the user is traversing along.

Link copied to clipboard
val currentStepPoints: List<Point>?

Provides a list of points that represent the current step step geometry.

Link copied to clipboard

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

Link copied to clipboard

Provides the distance remaining in meters tills the user reaches the end of the route.

Link copied to clipboard

Total distance traveled in meters along current leg.

Link copied to clipboard

Provides the duration remaining in seconds till the user reaches the end of the current step.

Link copied to clipboard

This will return the LegStep two steps ahead of the current step the user's on. If the user's current step is within 2 steps of their final destination this will return null.

Link copied to clipboard

Get 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.

Link copied to clipboard
Link copied to clipboard

Get the previous step the user traversed along, if the user is still on the first step, this will return null.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Index representing the current step the user is on.

Link copied to clipboard

Get the 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.

Link copied to clipboard

Provides a list of points that represent the upcoming step step geometry.