Create routes code & credentials

135
0
11-30-2020 10:17 AM
AndréGrce
New Contributor

I would like to create routes along walk or drive paths. Can you please advise how to create the variable 'credential' that is sent as a parameter below:

var routeTask = await RouteTask.CreateAsync(routeSourceUri, credential);

For routes in an example in San Diego I used the URL below. But I assume other URLs are needed to draw routes in other areas (e.g. in Europe) - how do I get such URL?

var routeSourceUri = newUri("http://sampleserver6.arcgisonline.com/arcgis/rest/services/NetworkAnalysis/SanDiego/NAServer/Route");

Can you please advise about example code showing how to use the 'credential' variable?

0 Kudos
0 Replies