I have a road network which i published on ArcGIS portal. The road network is working fine on ArcMap and when i published it is working fine using ArcGIS Rest API directly (.../RoadNetwork/NAServer/Route/).
I am having issues while configuring the directions widget in Webappbuilder (2.13 or before).
I have two questions
1. Travel Mode URL is giving me suggestion to add a GP Service why should i use a GP Service when i have the option to retrieve travel mode using ArcGIS rest API (..../RoadNetwork/NAServer/Route/retrieveTravelModes/) does this mean i have to publish a GP Service ?
2. When i configure the widget and run the directions i am getting following error in console.
What i am doing wrong ?
Solved! Go to Solution.
The problem is resolved now and I would like to share the solution so i am answering my own question.
So the issue was i was getting wrong travel modes from my service itself and since these travel modes were not actually defined in my network so they were causing this issue.
I was getting wrong travel modes due to the face i am running this on a ArcGIS portal where we had a default setting due to which the travel modes were getting overridden with the actual ones which i defined.
I have to remove the default settings of portal (Under Organization -> Utility Services -> Directions and Routing -> Routing Utilities URL)
Now when I removed this from our staging portal I am getting the correct travel modes and the widget is working as well.
The problem is resolved now and I would like to share the solution so i am answering my own question.
So the issue was i was getting wrong travel modes from my service itself and since these travel modes were not actually defined in my network so they were causing this issue.
I was getting wrong travel modes due to the face i am running this on a ArcGIS portal where we had a default setting due to which the travel modes were getting overridden with the actual ones which i defined.
I have to remove the default settings of portal (Under Organization -> Utility Services -> Directions and Routing -> Routing Utilities URL)
Now when I removed this from our staging portal I am getting the correct travel modes and the widget is working as well.