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(); });
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.