featureLayer.applyEdits([newGraphic], null, null, function (res) { // res is of type FeatureEditResult. // Need to query *again* to get the new object from its ID. // ORLY? YARLY. on.once(featureLayer, 'update-end', function(error, info){ var query = new Query(); query.objectIds = [res[0].objectId]; featureLayer.selectFeatures(query, FeatureLayer.SELECTION_NEW, function (result) { // Your stuff here, or in the callback function. if (typeof(mycallbackfunction) == "function") { return mycallbackfunction(newGraphic); } }); }); // Fire the layer update. featureLayer.refresh(); });
Angemeldete Mitglieder können Beiträge verfassen, Updates folgen und mehr. Neu hier? Registriere ein kostenloses Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.