MapsRoutingClient.GetDirectionsAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Returns a route between an origin and a destination, passing through waypoints if they are specified. The route will take into account factors such as current traffic and the typical road speeds on the requested day of the week and time of day. Information returned includes the distance, estimated travel time, and a representation of the route geometry. Additional routing information such as optimized waypoint order or turn by turn instructions is also available, depending on the options selected. Routing service provides a set of parameters for a detailed description of vehicle-specific Consumption Model. Please check Consumption Model for detailed explanation of the concepts and parameters involved.
public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Maps.Routing.Models.RouteDirections>> GetDirectionsAsync (Azure.Maps.Routing.RouteDirectionQuery query, System.Threading.CancellationToken cancellationToken = default);
abstract member GetDirectionsAsync : Azure.Maps.Routing.RouteDirectionQuery * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Maps.Routing.Models.RouteDirections>>
override this.GetDirectionsAsync : Azure.Maps.Routing.RouteDirectionQuery * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Maps.Routing.Models.RouteDirections>>
Public Overridable Function GetDirectionsAsync (query As RouteDirectionQuery, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of RouteDirections))
Parameters
- query
- RouteDirectionQuery
The route direction query, including a list of route points and route direction options.
- cancellationToken
- CancellationToken
The cancellation token to use.
Returns
Exceptions
query
is null.
Service returned a non-success status code.
Applies to
Azure SDK for .NET
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기