RouteProgress

class RouteProgress

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 that the user is traveling 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 the com.mapbox.navigation.core.trip.session.RouteProgressObserver. Note that the route progress object's immutable.

Parameters

route

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

routeGeometryWithBuffer

Geometry of the current DirectionsRoute with a buffer that encompasses visible tile surface are while navigating. This Geometry is ideal for offline downloads of map or routing tile data.

bannerInstructions

BannerInstructions current instructions for visual guidance.

voiceInstructions

VoiceInstructions current instruction for audio guidance.

currentState

RouteProgressState the current state of progress along the route. Provides route and location tracking information.

currentLegProgress

RouteLegProgress current progress of the active leg, includes time and distance estimations.

upcomingStepPoints

List location coordinates describing the upcoming step.

inTunnel

Boolean value indicating whether the current location is in a tunnel.

distanceRemaining

Float provides the distance remaining in meters until the user reaches the end of the route.

distanceTraveled

Float representing the distance traveled along the route in meters.

durationRemaining

Double seconds time remaining until the route destination is reached.

fractionTraveled

Float fraction traveled along the current route. This value is between 0 and 1 and isn't guaranteed to reach 1 before the user reaches the end of the route.

remainingWaypoints

Int number of waypoints remaining on the current route.

upcomingRouteAlerts

list of upcoming route alerts.

Types

Builder
Link copied to clipboard
class Builder(route: DirectionsRoute)
Builder for RouteProgress

Functions

equals
Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Indicates whether some other object is "equal to" this one.
hashCode
Link copied to clipboard
open override fun hashCode(): Int
Returns a hash code value for the object.
toBuilder
Link copied to clipboard
fun toBuilder(): RouteProgress.Builder
toString
Link copied to clipboard
open override fun toString(): String
Returns a string representation of the object.

Properties

bannerInstructions
Link copied to clipboard
val bannerInstructions: BannerInstructions?
BannerInstructions current instructions for visual guidance.
currentLegProgress
Link copied to clipboard
val currentLegProgress: RouteLegProgress?
RouteLegProgress current progress of the active leg, includes time and distance estimations.
currentState
Link copied to clipboard
val currentState: RouteProgressState
RouteProgressState the current state of progress along the route.
distanceRemaining
Link copied to clipboard
val distanceRemaining: Float
Float provides the distance remaining in meters until the user reaches the end of the route.
distanceTraveled
Link copied to clipboard
val distanceTraveled: Float
Float representing the distance traveled along the route in meters.
durationRemaining
Link copied to clipboard
val durationRemaining: Double
Double seconds time remaining until the route destination is reached.
fractionTraveled
Link copied to clipboard
val fractionTraveled: Float
Float fraction traveled along the current route.
inTunnel
Link copied to clipboard
val inTunnel: Boolean
Boolean value indicating whether the current location is in a tunnel.
remainingWaypoints
Link copied to clipboard
val remainingWaypoints: Int
Int number of waypoints remaining on the current route.
route
Link copied to clipboard
val route: DirectionsRoute
DirectionsRoute the navigation session is currently using.
routeGeometryWithBuffer
Link copied to clipboard
val routeGeometryWithBuffer: Geometry?
Geometry of the current DirectionsRoute with a buffer that encompasses visible tile surface are while navigating.
upcomingRouteAlerts
Link copied to clipboard
val upcomingRouteAlerts: List<UpcomingRouteAlert>
list of upcoming route alerts.
upcomingStepPoints
Link copied to clipboard
val upcomingStepPoints: List<Point>?
List location coordinates describing the upcoming step.
voiceInstructions
Link copied to clipboard
val voiceInstructions: VoiceInstructions?
VoiceInstructions current instruction for audio guidance.