Hi everyone
help me find a way to edit attributes of a featurelayer. but not using attributeInspector widget.
sofar I've set an edit button in Popup footer. users click on it and I want them to be able to edit attributes in another Div.
so I have the object of that specific element.
which looks like this:
- attributes:Object
- OBJECTID:"17"
- Shape:"Point"
- date:"Null"
- id:"Null"
- name:"some Thing"
- type:"some Type"
- __proto__:Object
- geometry:Object
- spatialReference:Object
- type:"point"
- x:5733576.450887503
- y:3865276.718386505
- __proto__:Object
- infoTemplate:Object
- symbol:null
- __proto__:Object
what can i do?
Solved! Go to Solution.
Hi beh soh,
You can simply use the ApplyEdits method of the FeatureLayer.
Example.
var attr = { "ID": targetRefID, "SUBSECRIPTION_TYPE": 1, "COVERAGE_TYPE": COVERAGE_TYPE_VALUE, "X_COORD": customerPoint.x, "Y_COORD": customerPoint.y }; var g_ = new Graphic(customerPoint, null, attr, null); customerLayer.applyEdits([g_], null, null, addCustomerResult, err);
If you find the answer, please mark it.
Hi beh soh,
You can simply use the ApplyEdits method of the FeatureLayer.
Example.
var attr = { "ID": targetRefID, "SUBSECRIPTION_TYPE": 1, "COVERAGE_TYPE": COVERAGE_TYPE_VALUE, "X_COORD": customerPoint.x, "Y_COORD": customerPoint.y }; var g_ = new Graphic(customerPoint, null, attr, null); customerLayer.applyEdits([g_], null, null, addCustomerResult, err);
If you find the answer, please mark it.