Dela via


MapsRoutingClient.GetImmediateRouteMatrixAsync Method

Definition

Overloads

GetImmediateRouteMatrixAsync(RouteMatrixOptions, CancellationToken)

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. As an example, let's say a food delivery company has 20 drivers and they need to find the closest driver to pick up the delivery from the restaurant. To solve this use case, they can call Matrix Route API. 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 sync request is 100 (the number of origins multiplied by the number of destinations).

GetImmediateRouteMatrixAsync(RouteMatrixQuery, CancellationToken)

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. As an example, let's say a food delivery company has 20 drivers and they need to find the closest driver to pick up the delivery from the restaurant. To solve this use case, they can call Matrix Route API. 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 sync request is 100 (the number of origins multiplied by the number of destinations).

GetImmediateRouteMatrixAsync(RouteMatrixOptions, CancellationToken)

Source:
MapsRoutingClient.cs

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. As an example, let's say a food delivery company has 20 drivers and they need to find the closest driver to pick up the delivery from the restaurant. To solve this use case, they can call Matrix Route API. 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 sync request is 100 (the number of origins multiplied by the number of destinations).

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

Parameters

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

GetImmediateRouteMatrixAsync(RouteMatrixQuery, CancellationToken)

Source:
MapsRoutingClient.cs

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. As an example, let's say a food delivery company has 20 drivers and they need to find the closest driver to pick up the delivery from the restaurant. To solve this use case, they can call Matrix Route API. 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 sync request is 100 (the number of origins multiplied by the number of destinations).

public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Maps.Routing.Models.RouteMatrixResult>> GetImmediateRouteMatrixAsync (Azure.Maps.Routing.RouteMatrixQuery routeMatrixQuery, System.Threading.CancellationToken cancellationToken = default);
abstract member GetImmediateRouteMatrixAsync : Azure.Maps.Routing.RouteMatrixQuery * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Maps.Routing.Models.RouteMatrixResult>>
override this.GetImmediateRouteMatrixAsync : Azure.Maps.Routing.RouteMatrixQuery * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Maps.Routing.Models.RouteMatrixResult>>
Public Overridable Function GetImmediateRouteMatrixAsync (routeMatrixQuery As RouteMatrixQuery, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of RouteMatrixResult))

Parameters

routeMatrixQuery
RouteMatrixQuery

The route matrix to query.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Exceptions

routeMatrixQuery is null.

Service returned a non-success status code.

Applies to