MapboxTripProgressApi
class MapboxTripProgressApi
Used for calculating data needed for trip progress.
Parameters
formatter
an instance of TripProgressUpdateFormatter
processor
an instance of TripProgressProcessor
Functions
Link 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
Calculates a trip progress update based on a RouteProgress