Hi, I'm trying to create an editable map based upon the OpenLayers wfs-protocol-transactions example. On some occasions (for example when other users have updated features) I want to abandon the outstanding edit on a feature and redraw it as it was originally obtained from the base WFS service. I couldn't work out how to do that and have reverted to trying to redraw the entire layer using the layer.redraw and layer.refresh functions. Unfortunately nothing seems to work. The features stay as drawn, which no longer matches what is in the geoserver service. How do I do some equivalent of "undo this feature and cancel any pending changes on it", or alternatively "refresh this feater (or if necessary all features) from the WFS service. The code fragment I have at this point is: var saveStrategy = new OpenLayers.Strategy.Save ({ onCommit: function(response) { if (response.success()) { alert("Good"); alert(response.priv.responseText); } else { alert("Bad"); alert(response.priv.responseText);
} if (confirm("Do you want to abort this request ?")) { alert("Abort request here"); this.layer.refresh(true); this.layer.redraw(); } } }); wfs = new OpenLayers.Layer.Vector("Editable Features", { strategies: [new OpenLayers.Strategy.BBOX(), saveStrategy], AND SO ON... Any Suggestions ? David G.
_______________________________________________ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users