MapboxTripProgressApi
Used for calculating data needed for trip progress.
Parameters
formatter
an instance of TripProgressUpdateFormatter
processor
an instance of TripProgressProcessor
Constructors
Functions
Link copied to clipboard
fun getTripDetails(route: NavigationRoute): Expected<TripOverviewError, TripOverviewValue>
Content copied to clipboard
Calculates trip details based on NavigationRoute. The return value contains leg time
, leg duration
and estimated time to arrival
for each RouteLeg in NavigationRoute.directionsRoute in the form of RouteLegTripOverview. It also contains totalTime
, totalDistance
and totalEstimatedTimeToArrival
for the entire NavigationRoute.directionsRoute
Link copied to clipboard
fun getTripProgress(routeProgress: RouteProgress): TripProgressUpdateValue
Content copied to clipboard
Calculates a trip progress update based on a RouteProgress