Hi Vara
Thanks for your prompt reply. I have not set proxy page on my server. Secondly as far as my code goes ( from txt) i got this error
success: {"error":{"code":500,"message":"Unable to complete operation.","details":["No edits ('adds', 'updates' or 'deletes') were specified."]}}
Regards and Thanks
Saurabh
Hi Saurabh,
Yes, definitely you can do this through a simple POST request approach. We can do both attribute updates, geometry updates, new feature creation, deletion by sending a POST request, just similar to calling "applyEdits" function.
I have gone through your post in the mentioned link.
It is required to use Proxy page for editing. Have you used any proxy page configured in your application. If not, please go through the below link
https://developers.arcgis.com/javascript/jshelp/ags_proxy.html
Please send me the error that you are facing, It helps me in identifying the issue.
Thanks & Regards,
Vara Prasad.
Thanks for the reply . But I am trying to update some attribute of my feature service or add new feature to it. I can do it through service page (HTML). I am just trying to do it from my .net code (attached below). As i can see that HTML post option works fine without any Arcgis LIB. Can I do it the way I am approaching or something on these line?
https://community.esri.com/message/311103?sr=search&searchId=895cbc49-833f-4835-b6c6-6699f303bbcb&searchIndex=9#311103
I am not much of exp in java script API so your guidance will be very valuable
Hi Ediberto Alves & Saurabh Gupta,
You can follow the below procedure.
1. Create objects for both the featurelayers of your Feature server service using "FeatureLayer" class as shown in below example.
var landuseLineLayer = new FeatureLayer("http://sampleserver6.arcgisonline.com/arcgis/rest/services/Military/FeatureServer/8", { mode: FeatureLayer.MODE_SNAPSHOT, outFields: ["*"] });
2. Now create Graphic objects to be inserted into the feature Layers, add call "applyEdits" by passing the array of the Graphic objects as first parameter.
3. To Update any features, pass the array objects of the features interms of objects of Graphics as second parameter to "applyEdits" function.
4. To Delete, pass the array of graphic objects as third parameter to "applyEdits" function.
Example:
<featureLayerObj>.applyEdits(addGraphicsArr, updateGraphicsArr , deleteGraphicsArr);
Please let me know if you are looking for something else or you need any more details.
Hi
I also want to do the same..Have u got any answer for ur question?
Regards
Přihlášení členové mohou přispívat, sledovat aktualizace a další. Jste tu noví? Zaregistrujte si bezplatný účet.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.