I'm trying to develop my own widget for a web map, based on the Analysis widget.
I create a new web 2D web app from the ArcGIS Web AppBuilder menu.
I try and add a widget to the screen based on the 'Analysis' widget, selecting the 'Find Nearest' tool within the widget. I have ticked every config box within the tool to be checked.
The widget is now added to the map.
If I click the widget, the tool opens, with all the selection layers empty (as expected as I have not added any map layers).
However, the network console in developer tools shows a never ending loop of communication going on at this point.
are then followed by
and repeat. From adding some console.log messages, and looking at the responses, I can see that the calls for a Token are successful, but the calls to the GPServer always return
I've tried with maps with layers in - the first two selection boxes are completed but not the third one. I've tried adding https://analysis3.arcgis.com/arcgis/rest/services/tasks/GPServer as a GeoProcessing layer but that just times out validating.
I have been looking at this for a while now without success. Any clues?
For clarity, I haven't written any of this code - it is all OOTB esri code, so I am assuming that it is a configuration issue, but I can't see what I am missing.
I've used the routing widget successfully (obviously I had to configure the routing service that the widget would use, but that validated nicely - there is no such configuration immediately obvious for the Analysis widget, and the documentation is quite vague regarding the geoprocessing service, saying only that I should have permission to use it, which as far as I can tell, I have).