This content has been marked as final. Show 3 replies
Can you provide code to reproduce this?
Do you have an Editor dijit associated with this Feature Layer ? I ran into alot troubles with removing and readding a Feature Layer when it was a child of a dijit.
I found that after removing the layer, if i destroyed dijit as well, all my problems went away
editorWidget = new esri.dijit.editing.Editor(params,'editorDiv'); //on remove map.removeLayer(layer); editorWidget.destroy();
I've taken the On Demand sample from your site and added 2 buttons. One that will perform a query on the feature layer. The other will remove then add back the layer to the map.
If you run the query first it will work. Then, if you remove/add the layer from the map, the query will not return at all (not success or failure).
I've also put some alerts to show what the problem is (the internal _mode property gets cleared in the process of remove/add) and this code fails silently in your API when queryFeatures is called on the feature layer.
test.zip 1.8 K