Using AGOL Routing Service in JSAPI 3.x

257
0
06-23-2021 11:41 AM
Arne_Gelfert
Regular Contributor

Getting my feet wet with he world of routing. So I started with the simple 3.x example here and wanted to expand on it.

I created an item in our Enterprise Portal for the AGOL World Route service and provided my AGOL credentials. Then I plugged the URL for this item into the routeTask definition in the above referenced example, as follows:

 

routeTask = new RouteTask(<my enterprise URL>)

 

 When I try to run this, the call ...

 

routetask.solve(routeParams)

 

fails and I see this:

 

error: {code: 404, messageCode: "POR_205244", message: "Your login session has been reset. Please try again.",…}
code: 404
details: []
message: "Your login session has been reset. Please try again."
messageCode: "POR_205244"

 

Anything I need to change in AGOL or in my Enterprise Portal? Is there another, entirely different, approach to tap into a Routing services besides rolling your own on prem? New territory for me. Appreciate any feedback.

0 Kudos
0 Replies