3

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!

PolyGeo
65.5k29 gold badges115 silver badges350 bronze badges
asked Oct 14, 2013 at 3:43

1 Answer 1

2

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.

answered Oct 15, 2013 at 3:51
1
  • 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! Commented Oct 21, 2013 at 16:53

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.