AnsweredAssumed Answered

FeatureLayer: "graphic-add" event is not fired consistently.

Question asked by mike916 on Aug 31, 2015
Latest reply on Sep 1, 2015 by khutchins-esristaff

Hi,

 

I have added a FeatureLayer to my web map for online editing. I have also set an event listener to the "graphic-add" event.

I use the Editor widget and the TemplatePicker widget.

 

I first choose a template from the TemplatePicker, and then digitize a graph on the map.

The plan is to call a function to update the attribute information after the graph is added to the featurelayer.

myEditingFLayer.on("graphic-add", updateGrpAttribute);

 

updateGrpAttribute : function(evt){

var gg = evt.graphic;

gg.attributes["UserName"] = userName;

gg.attributes["LASTUPDATE"] = updateTime;

gg.attributes["CntyFips"] = CNTY_ID;

gg.attributes["CAPTUREMETH"] = "Placed on Map";

 

 

myEditingFLayer.applyEdits(null, [gg], null, EditNew_Success, error);

}

 

 

But, this handler is not consistently fired. If I see the progress bar displays, the designated event handler will not be executed.

 

Please advise.

 

Thanks,

 

Mike

Outcomes