How to trigger an event when that exclamation mark is added to the map ?
It appears that you are using the Editor widget, so I think what you want is to capture the "create" event of the underlying SketchViewModel instance. In that case, it would be something like:
editor.viewModel.sketchViewModel.on("create", function(evt) { if (evt.state == "complete") { //do something with evt.graphic here } });
Unfortunately that does not work, any other idea ?
You can listen for the "edits" event directly on the source layer
https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#event-edits
Aangemelde leden kunnen berichten plaatsen, updates volgen en meer. Nieuw hier? Registreer een gratis account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.