Share via


MapsRoutingModelFactory.RouteDirections Method

Definition

Initializes a new instance of RouteDirections.

public static Azure.Maps.Routing.Models.RouteDirections RouteDirections (string formatVersion = default, System.Collections.Generic.IEnumerable<Azure.Maps.Routing.Models.RouteData> routes = default, System.Collections.Generic.IEnumerable<Azure.Maps.Routing.Models.RouteOptimizedWaypoint> optimizedWaypoints = default, Azure.Maps.Routing.Models.RouteReport report = default);
static member RouteDirections : string * seq<Azure.Maps.Routing.Models.RouteData> * seq<Azure.Maps.Routing.Models.RouteOptimizedWaypoint> * Azure.Maps.Routing.Models.RouteReport -> Azure.Maps.Routing.Models.RouteDirections
Public Shared Function RouteDirections (Optional formatVersion As String = Nothing, Optional routes As IEnumerable(Of RouteData) = Nothing, Optional optimizedWaypoints As IEnumerable(Of RouteOptimizedWaypoint) = Nothing, Optional report As RouteReport = Nothing) As RouteDirections

Parameters

formatVersion
String

Format Version property.

routes
IEnumerable<RouteData>

Routes array.

optimizedWaypoints
IEnumerable<RouteOptimizedWaypoint>

Optimized sequence of waypoints. It shows the index from the user provided waypoint sequence for the original and optimized list. For instance, a response:

&lt;optimizedWaypoints&gt;
&lt;waypoint providedIndex="0" optimizedIndex="1"/&gt;
&lt;waypoint providedIndex="1" optimizedIndex="2"/&gt;
&lt;waypoint providedIndex="2" optimizedIndex="0"/&gt;
&lt;/optimizedWaypoints&gt;

means that the original sequence is [0, 1, 2] and optimized sequence is [1, 2, 0]. Since the index starts by 0 the original is "first, second, third" while the optimized is "second, third, first".

report
RouteReport

Reports the effective settings used in the current call.

Returns

A new RouteDirections instance for mocking.

Applies to