MapsRoutingClient.GetRouteMatrix 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 Azure.Maps.Routing.Models.GetRouteMatrixOperation GetRouteMatrix (Azure.WaitUntil waitUntil, Azure.Maps.Routing.RouteMatrixOptions options, System.Threading.CancellationToken cancellationToken = default);
abstract member GetRouteMatrix : Azure.WaitUntil * Azure.Maps.Routing.RouteMatrixOptions * System.Threading.CancellationToken -> Azure.Maps.Routing.Models.GetRouteMatrixOperation
override this.GetRouteMatrix : Azure.WaitUntil * Azure.Maps.Routing.RouteMatrixOptions * System.Threading.CancellationToken -> Azure.Maps.Routing.Models.GetRouteMatrixOperation
Public Overridable Function GetRouteMatrix (waitUntil As WaitUntil, options As RouteMatrixOptions, Optional cancellationToken As CancellationToken = Nothing) As 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