Update geometry then database has the same geometry two

3720
2
Jump to solution
05-21-2015 08:34 PM
xiaoyunnsongb
New Contributor III


Hello every  superiors:

            when I  move a  graphic geometry  to another place , then i use this js

 

     currentFeatureLayer.applyEdits(null, [evt.graphic], null,function(result){
                    createLog(logObj);
                   },function(err){
                    flag4log = -1;
                   });

to  update databse ,then  the graphic geometry record   become  two row  in  oracle database, the two record  all colums  the same。

hope you can help me ,thanks very much 。

0 Kudos
1 Solution

Accepted Solutions
OwenEarley
Occasional Contributor III

Does the evt.graphic have an Object ID for a feature that exists in your data set?

applyEdits(adds?, updates?, deletes?, callback?, errback?)

Apply edits to the feature layer. Only applicable for layers in a feature service.

<Graphic[]> updates

Array of features whose geometry and/or attributes have changed. Features must have a valid OBJECTID.

You can check this by logging the evt.graphic:

console.log(evt.graphic);

View solution in original post

2 Replies
OwenEarley
Occasional Contributor III

Does the evt.graphic have an Object ID for a feature that exists in your data set?

applyEdits(adds?, updates?, deletes?, callback?, errback?)

Apply edits to the feature layer. Only applicable for layers in a feature service.

<Graphic[]> updates

Array of features whose geometry and/or attributes have changed. Features must have a valid OBJECTID.

You can check this by logging the evt.graphic:

console.log(evt.graphic);

xiaoyunnsongb
New Contributor III

Dear Mr. oearley

          Thanks very much for your answer.

The objectid really has the same ,but the objectid is auto create by

SELECT registration_id FROM sde.table_registry WHERE table_name = 'RESOURCEALARM' and owner = 'SDE';

I don't know how can it has same.

0 Kudos