Share via


MapsRoutingClient.GetRouteMatrixAsync Method

Definition

The Matrix Routing service allows calculation of a matrix of route summaries for a set of routes defined by origin and destination locations by using an asynchronous (async) or synchronous (sync) request. For every given origin, the service calculates the cost of routing from that origin to every given destination. The set of origins and the set of destinations can be thought of as the column and row headers of a table and each cell in the table contains the costs of routing from the origin to the destination for that cell. For each route, the travel times and distances are returned. You can use the computed costs to determine which detailed routes to calculate using the Route Directions API. The maximum size of a matrix for async request is 700 (the number of origins multiplied by the number of destinations).

public virtual System.Threading.Tasks.Task<Azure.Maps.Routing.Models.GetRouteMatrixOperation> GetRouteMatrixAsync (Azure.WaitUntil waitUntil, Azure.Maps.Routing.RouteMatrixOptions options, System.Threading.CancellationToken cancellationToken = default);
abstract member GetRouteMatrixAsync : Azure.WaitUntil * Azure.Maps.Routing.RouteMatrixOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Maps.Routing.Models.GetRouteMatrixOperation>
override this.GetRouteMatrixAsync : Azure.WaitUntil * Azure.Maps.Routing.RouteMatrixOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Maps.Routing.Models.GetRouteMatrixOperation>
Public Overridable Function GetRouteMatrixAsync (waitUntil As WaitUntil, options As RouteMatrixOptions, Optional cancellationToken As CancellationToken = Nothing) As Task(Of GetRouteMatrixOperation)

Parameters

waitUntil
WaitUntil

If the method should wait to return until the long-running operation has completed on the service; Started if it should return after starting the operation.

options
RouteMatrixOptions

The route direction options.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Exceptions

options is null.

Service returned a non-success status code.

Applies to