[Featureserver] OpenLayers+FeatureServer full transactional example

Peter Robins fs at peterrobins.co.uk
Sat Jul 25 05:57:22 EDT 2009


afaics, OL http protocol will support crud with FS without much problem. 'C' 
and 'R' work as is; 'U' and 'D' require '/fid' at end of url string. At 
first, I thought I would add this by supplying a function to the protocol, 
but it struck me that all I have to do is add a url property to each feature 
as it's read in, which will then be used on any update/delete.

So I have a featureadded listener which calls:

    featureAdded: function (e) {
        e.feature.url = baseUrl+'/'+e.feature.fid;
    }

I'm using this with fixed and save strategies, and it all seems to work 
well. :-)



More information about the Featureserver mailing list