eta(request)
Retrieves estimated arrival times to up to 10 destinations from a single starting point.
Declaration
eta(request: EtaRequestOptions): Promise<EtaResponse>;Parameters
- request:
An Etarequestoptions object that specifies details for the server to provide estimated arrival times at one or more destinations.
Return Value
A promise that resolves with an EtaResponse on success, or rejects with an Error on failure.
Discussion
To get a set of estimated arrival times, provide an EtaRequestOptions object when you call the eta(request) method. You can provide up to 10 destinations. The server returns an error if you request more than 10 destinations in a single request.
Pass an AbortSignal from an AbortController to the signal option to allow the controller to cancel a pending request. When the controller aborts, the promise it returns rejects with a DOMException whose name is "AbortError".