Show / Hide Table of Contents

Method CreateAsync

CreateAsync(Uri)

Creates a route task from an online URI.

Declaration
public static async Task<RouteTask> CreateAsync(Uri serviceUri)
Parameters
Type Name Description
System.Uri serviceUri

A URI to the online routing services.

Returns
Type Description
System.Threading.Tasks.Task<RouteTask>

The task object representing the asynchronous create operation. The value of the task result is a RouteTask object.

Applies to

Platforms and versions
TargetVersions
.NET Standard 2.0100.14 - 200.8
.NET100.14 - 200.8
.NET Windows100.14 - 200.8
.NET Android200.2 - 200.8
.NET iOS200.0 - 200.8
.NET Framework100.14 - 200.8
Xamarin.Android100.14
Xamarin.iOS100.14 - 100.15
UWP100.14 - 200.8

CreateAsync(Uri, String)

Creates a route task from an online URI.

Declaration
public static async Task<RouteTask> CreateAsync(Uri serviceUri, string apiKey)
Parameters
Type Name Description
System.Uri serviceUri

A URI to the online routing services.

System.String apiKey

The unique key generated from ArcGIS Developers website.

Returns
Type Description
System.Threading.Tasks.Task<RouteTask>

The task object representing the asynchronous create operation. The value of the task result is a RouteTask object.

Applies to

Platforms and versions
TargetVersions
.NET Standard 2.0100.10 - 200.8
.NET100.13 - 200.8
.NET Windows100.13 - 200.8
.NET Android200.2 - 200.8
.NET iOS200.0 - 200.8
.NET Framework100.10 - 200.8
Xamarin.Android100.10 - 100.14
Xamarin.iOS100.10 - 100.15
UWP100.10 - 200.8

CreateAsync(String, String)

Creates a route task from a local geodatabase.

Declaration
public static async Task<RouteTask> CreateAsync(string pathToDatabase, string networkName)
Parameters
Type Name Description
System.String pathToDatabase

A file path to a geodatabase.

System.String networkName

A network name.

Returns
Type Description
System.Threading.Tasks.Task<RouteTask>

The task object representing the asynchronous create operation. The value of the task result is a RouteTask object.

Applies to

Platforms and versions
TargetVersions
.NET Standard 2.0100.3 - 200.8
.NET100.13 - 200.8
.NET Windows100.13 - 200.8
.NET Android200.0 - 200.8
.NET iOS200.0 - 200.8
.NET Framework100.0 - 200.8
Xamarin.Android100.0 - 100.15
Xamarin.iOS100.0 - 100.15
UWP100.0 - 200.8
Relevant samples
Offline routing: Solve a route on-the-fly using offline data.

CreateAsync(TransportationNetworkDataset)

Creates a route task from a transportation network dataset.

Declaration
public static async Task<RouteTask> CreateAsync(TransportationNetworkDataset transportationNetwork)
Parameters
Type Name Description
TransportationNetworkDataset transportationNetwork

A transportation network dataset.

Returns
Type Description
System.Threading.Tasks.Task<RouteTask>

The task object representing the asynchronous create operation. The value of the task result is a RouteTask object.

Applies to

Platforms and versions
TargetVersions
.NET Standard 2.0100.3 - 200.8
.NET100.13 - 200.8
.NET Windows100.13 - 200.8
.NET Android200.0 - 200.8
.NET iOS200.0 - 200.8
.NET Framework100.0 - 200.8
Xamarin.Android100.0 - 100.15
Xamarin.iOS100.0 - 100.15
UWP100.0 - 200.8
Relevant samples
Mobile map (search and route): Display maps and use locators to enable search and routing offline using a Mobile Map Package.
In This Article
Back to top Copyright © 2022 Esri.