Between version 4.16 and version 4.22 of the API, on the FeatureLayer's "edits" event, the "target" property (hence target.url) is no longer exposed/returned, which we use to perform a check, i.e., figuring out on which layer to go and update the an other field with the WebService 'Update_Features'.
Any images of code...
DamianoMontrasio_0-1653601007853.png
and
DamianoMontrasio_1-1653601024934.png
there's an other way to create a feature with an hidden field forced to a specific value?
thanks
Solved! Go to Solution.
You can use bind in order to maintain a reference to your layer. For example:
l_FeatureLayer.on("edits", otRilievi_Object.rilievi_edits_complete.bind(otRilievi_Object, l_FeatureLayer));...and elsewhere...
this.rilievi_edits_complete = function(target, p_Features) {
//target is now a reference to the layer being edited
};
This is a compate beteen api 4.15 with target property and 4.22 without.
DamianoMontrasio_0-1653602826121.png
I've not found info about deprecation of target....
Was useful for us.
Thanks
You can use bind in order to maintain a reference to your layer. For example:
l_FeatureLayer.on("edits", otRilievi_Object.rilievi_edits_complete.bind(otRilievi_Object, l_FeatureLayer));...and elsewhere...
this.rilievi_edits_complete = function(target, p_Features) {
//target is now a reference to the layer being edited
};
Thank you very much Joel,
your suggestion was perfect!!!