RouteProgress

data class RouteProgress(val directionsRoute: DirectionsRoute, val legIndex: Int, val distanceRemaining: Double, val currentStepPoints: List<Point>, val upcomingStepPoints: List<Point>?, val stepIndex: Int, val legDistanceRemaining: Double, val stepDistanceRemaining: Double, val intersections: List<StepIntersection>?, val currentIntersection: StepIntersection?, val upcomingIntersection: StepIntersection?, val currentLegAnnotation: CurrentLegAnnotation?, val intersectionDistancesAlongStep: Map<StepIntersection, Double>?)

This class contains all progress information at any given time during a navigation session. This progress includes information for the current route, leg and step the user is traversing along. With every new valid location update, a new route progress will be generated using the latest information.

The latest route progress object can be obtained through either the ProgressChangeListener or the MilestoneEventListener callbacks. Note that the route progress object's immutable.

Since

0.1.0

Constructors

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

Types

Link copied to clipboard
class Builder(directionsRoute: DirectionsRoute, legIndex: Int, distanceRemaining: Double, currentStepPoints: List<Point>, stepIndex: Int, legDistanceRemaining: Double, stepDistanceRemaining: Double)

Properties

Link copied to clipboard

Provides the current RouteLeg the user is on.

Link copied to clipboard

Gives a RouteLegProgress object with information about the particular leg the user is currently on.

Link copied to clipboard

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

Link copied to clipboard

Get the route the navigation session is currently using. When a reroute occurs and a new directions route gets obtained, with the next location update this directions route should reflect the new route. All direction route get passed in through MapLibreNavigation.startNavigation.

Link copied to clipboard

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

Link copied to clipboard

Total distance traveled in meters along route.

Link copied to clipboard

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

Link copied to clipboard

Get the fraction traveled along the current route, this is a float value between 0 and 1 and isn't guaranteed to reach 1 before the user reaches the end of the route.

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

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.

Link copied to clipboard

Number of waypoints remaining on the current route.

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

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

Functions

Link copied to clipboard