BriefRouteDurationProvider
class BriefRouteDurationProvider(trafficRouter: TrafficRouter, coroutineDispatcher: CoroutineDispatcher = Dispatchers.IO)
Provider for fetching ETA (Estimated Time of Arrival) for different transport modes using brief route information.
This provider queries the TrafficRouter to get brief route info for transport modes other than the currently selected one, allowing the UI to show ETAs for all available transport modes without building full routes.
Note: Using this provider will make additional API requests for each non-selected transport mode, which may contribute to your API usage quota. The ETA for the currently selected transport mode will be obtained automatically from the full route calculation, so no additional request is made for it.
Constructors
Functions
Link copied to clipboard
suspend fun fetchETAs(startPoint: RouteSearchPoint, finishPoint: RouteSearchPoint, transportModes: List<TransportMode>): Map<TransportMode, Duration?>
Fetches ETA durations for the specified transport modes.