I'm new to ArcGIS javascript API, now I want to create a feature layer and then add an array of attributes or simply update the array of attributes of a specific field. I only need to replace the original values array as my own array. Is that possible? There's a method: attr(name,value), Can I use this? Can any one give me some hints or code? Thanks in advance!
1 Answer 1
i'd start by taking a look at the sample below, which demonstrates the use of a widget that simplifies the process of passing attribute edits back to ArcGIS Server.
https://developers.arcgis.com/en/javascript/jssamples/ed_attribute_inspector.html
if you aren't interested in using one of the APIs widgets, you can also make your own calls to featureLayer.applyEdits()
https://developers.arcgis.com/en/javascript/jsapi/featurelayer-amd.html#applyedits.
-
Thanks for your help. I don't want to use the Editor Widget. How to set the layer editable? I'm still confused about how to use applyEdits() method. Can you give me some example? Thank you!yufei– yufei2013年10月21日 16:53:16 +00:00Commented Oct 21, 2013 at 16:53
Explore related questions
See similar questions with these tags.