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(); });
Los miembros registrados pueden publicar, seguir actualizaciones y más. ¿Nuevo aquí? Regístrate gratis.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.