MapboxTripProgressApi

Used for calculating data needed for trip progress.

Parameters

formatter
processor

an instance of TripProgressProcessor

Constructors

Link copied to clipboard
constructor(formatter: TripProgressUpdateFormatter)

Properties

Link copied to clipboard

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