Dear All:<br>I try to built my own WFS server , I have Featureserver + mod_python +postgis on my local pc.<br>If I use OpenLayers.Control.ModifyFeature(wfs) method, how can I catch the modified feature and post it to FS?<br>
I try to collect all features from wfs layer, and send it back to featureserver. it doesn&#39;t work.<br>I have already try some example from OL examples . and I could not find a lot of information about it in ol maillinglist. <br>
It would be thanksful that somebody can point out where I should go. <br>Here is some code from my:<br><br>            drawControls = {<br>                    point: new OpenLayers.Control.DrawFeature(vectors,<br>                                OpenLayers.Handler.Point),<br>
                    line: new OpenLayers.Control.DrawFeature(vectors,<br>                                OpenLayers.Handler.Path),<br>                    polygon: new OpenLayers.Control.DrawFeature(vectors,<br>                                OpenLayers.Handler.Polygon),<br>
                    editPolygon:new OpenLayers.Control.ModifyFeature(wfs, {<br>                        title: &quot;Modify polygon&quot;}))<br>            <br>                };<br><br>var arr = [];<br>            var j = 0;<br>
            for(var i =0; i&lt;wfs.features.length;i++){<br>                if(wfs.features[i].gml.featureType == &quot;polygon&quot;){<br>                    arr[j] = wfs2.features[i];<br>                    j++;<br>                }<br>
            }<br>            json = geojson.write(arr);<br><br>            new OpenLayers.Ajax.Request(url, <br>                     {   method: &#39;post&#39;, <br>                         postBody: json,<br>                         requestHeaders: [&#39;Accept&#39;, &#39;application/json&#39;],<br>
                         onSuccess: success,<br>                         onFailure: function(xhr) {<br>                           $(&#39;info&#39;).innerHTML = &quot;Failed upload (status code &quot;+xhr.status+&quot;). Check your URL.&quot;<br>
                         }<br>                      }<br>                     );<br><br>all the best <br><br>Sam<br>