POST
|
Thanks for the reply. If I generate my own APIs to save and load the routes, is it possible to add these results to a layer/directions object and have them display as per normal, without having to re-calculate the route?
... View more
3 weeks ago
|
0
|
0
|
77
|
POST
|
I've successfully called the NAServer route API and using returnRoutes=true, I have an object within my javascript that contains the results of my routing request. How can I add this to a feature layer so it gets permanently stored? I've tried using layer.add and applyEdits but nothing seems to happen, and I don't appear to get any error messages. This is my first time battling with javascript and the ESRI SDK, so I might be making foolish errors. So, 1) Is the route object returned from the routing service a valid geometry to save in a feature layer? 2) Do I have to create a feature layer first to save it to? Does it have to have the exact same attributes? 3) Has anybody ever done this, and can point me at some sample code that might help? Many thanks in advance Rob
... View more
3 weeks ago
|
0
|
3
|
100
|
POST
|
Turns out I didn't have permissions to run the analysis widget on the server.
... View more
3 weeks ago
|
0
|
0
|
37
|
POST
|
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. Calls to https://www.arcgis.com/sharing/generateToken?request=getToken&serverUrl=https%3A%2F%2Fanalysis3.arcgis.com%2Farcgis%2Frest%2Fservices%2Ftasks%2FGPServer&token=<snip>&referer=localhost%3A3344&f=json are then followed by https://analysis3.arcgis.com/arcgis/rest/services/tasks/GPServer?f=json&token=<snip> 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 {"error":{"code":498,"message":"Invalid token.","details":[]}} 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).
... View more
03-02-2021
02:11 AM
|
0
|
1
|
196
|
Online Status |
Offline
|
Date Last Visited |
3 weeks ago
|