ApplyEdits always adds a new point to the map

546
2
11-06-2012 11:40 AM
cristiBJ
New Contributor III
I was doing a system based on the citizen serice request sample.

Feature layer displays ok

When I try each of the three lines of code, it always add a new point to the current map, instead of updating, or deleting, it always add a new point to the feature layer.

currentFeature.getLayer().applyEdits([currentFeature], null, null);  // to add new point
currentFeature.getLayer().applyEdits(null, [currentFeature], null);  // to update attributes
currentFeature.getLayer().applyEdits(null, null, [currentFeature]);  // to delete feature

What could possibly wrong, any clues? I have been trying... for 2 weeks.  Your help is much appreciated.
0 Kudos
2 Replies
cristiBJ
New Contributor III
anyone can help shed a little light?
0 Kudos
cristiBJ
New Contributor III
Made it working today.
I found out if the point is not exactly the same, the function call applyEdits(null,[UpdateFeature],null) still create a new point feature.
How to close this thread, I helped myself.
0 Kudos