POST
|
Figured it out. This endpoint only accepts application/x-www-form-urlencoded requests, and I was sending JSON, so it didn't see any of the parameters I was passing, including the token.
... View more
02-28-2021
12:30 PM
|
0
|
0
|
715
|
POST
|
I need to programmatically call the analysis extract data endpoint (https://developers.arcgis.com/rest/analysis/api-reference/extract-data.htm). I've written client side and server side code in js/node and I can't seem to get either approach to work. On the client side, I get CORS issues, and in the nodejs code, the endpoint responds saying that anonymous access isn't allowed. I am using a valid token and I'm using an account that is able to use this tool from the webmap viewer, so I assume my permissions are valid as well. I'm trying to hit: https://analysis5.arcgis.com/arcgis/rest/services/tasks/GPServer/ExtractData/submitJob because this is the URL that I saw the webmap viewer was using. Although I've also tried other instances of this service (analysis, analysis1, analysis2, etc). I've created a github repo with the code: https://github.com/danbritt/data-extractor-example Any help would be appreciated, as this is an important tool that I want to provide in a project I'm working on.
... View more
02-27-2021
07:09 AM
|
1
|
1
|
1179
|
POST
|
Thanks for the answer, Rene. That did the trick. I did also notice that setting the "visible" property of a graphic to false in a FeatureLayer (webgl set to 0) does not hide the graphic in MapView, but it does in SceneView. I have a need to temporarily hide a graphic and as a workaround, I'm currently modifying the definitionExpression to exclude that OBJECTID, then set it back later, but that's kind of cumbersome with the network traffic depending on number of features. I'm looking forward to more of these features coming to the MapView and the WebGL FeatureLayers in the future! Also, thanks for the work on the new webpack plugin. It's made the process of integrating the API into our build so much easier!
... View more
05-19-2018
05:54 AM
|
0
|
0
|
1099
|
POST
|
Link to github showcasing this particular issue with version 4.7.2 of the API: GitHub - danbritt/arcgis-api-refresh-issue This project uses this as a base: jsapi-resources/4.x/webpack/demo at master · Esri/jsapi-resources · GitHub and I'm using the featurelayer from this example: ArcGIS API for JavaScript Sandbox When using applyEdits on a FeatureLayer that is in a SceneView, the new feature saves and shows up on the map. If you switch to a MapView, it saves the features correctly, but they do not show on the map unless you pan away and then back. (In my github, you can change the import at the top of webmapview.tsx to test this issue.) The only way I can get the layer to refresh in a MapView is to do some weird asynchronous changing of the definitionExpression using window.setTimeout() (which hasn't been reliable), or removing and re-adding the layer to the map which causes all features to disappear for a second which isn't ideal. I tried using the refresh() method of FeatureLayer but it didn't seem to do anything. I did not see any requests made in the network tab of chrome dev tools or any redrawing of the layer. Is this a bug? Or is there some way to refresh the layer in a MapView that I am not seeing? Any help would be appreciated, and if I can show any more details let me know. Thanks!
... View more
05-16-2018
03:09 PM
|
0
|
2
|
1427
|
Title | Kudos | Posted |
---|---|---|
1 | 02-27-2021 07:09 AM |
Online Status |
Offline
|
Date Last Visited |
03-01-2021
09:12 PM
|