AnsweredAssumed Answered

Issue in Finding  routes between locations in xamarin

Question asked by MobleJoseph on Jul 1, 2016

Hi All,

    I am facing issue with finding routes between two location in ARCGIS xamarin. I have tried the example https://developers.arcgis.com/xamarin/quartz/android/guide/find-a-route.htm . But in the example the URI used is  http://sampleserver6.arcgisonline.com/arcgis/rest/services/NetworkAnalysis/SanDiego/NAServer/Route

 

But i need to access the URI http://route.arcgis.com/arcgis/rest/services/World/Route/NAServer/Route_World  which requires authenticated call.So i registered my App by referring the link :Implementing App Login | ArcGIS for Developers. and generated the Token  and tried :"http://route.arcgis.com/arcgis/rest/services/World/Route/NAServer/Route_World/solve?token=<Token>&stops=-122.4079,37.78356;-122.404,37.782&f=json" in Postman and is working fine, but not working in my App.

In the example the route task is fetched as follows:

    var routeSourceUri= new Uri("http://route.arcgis.com/arcgis/rest/services/World/Route/NAServer/Route_World ");

    var routeTask = await RouteTask.CreateAsync(routeSourceUri);

I tried appending the uri with token, but it is not working.

Can anyone suggest a workaround to get the routeTask in xamarin with token authentication.

 

Thanks in advance.

Outcomes