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!


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.


if you aren't interested in using one of the APIs widgets, you can also make your own calls to featureLayer.applyEdits()


|improve this answer|||||
  • 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 Oct 21 '13 at 16:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.