[OpenLayers-Users] WFS GetFeature Example

mortac8 ashley_c_mort at raytheon.com
Tue Aug 17 11:20:56 EDT 2010


I am looking at the WFS GetFeature example [1] and trying to figure out how
to edit and save the feature back to the WFS.  

var layer = new OpenLayers.Layer.WMS(
                "States WMS/WFS",
                "http://server:8080/geoserver/ows",
                {layers: 'acme:cities', format: 'image/gif'}
);
var wfs=OpenLayers.Protocol.WFS.fromWMSLayer(layer, options);
var vectorLayer=new OpenLayers.Layer.Vector();
var select = new OpenLayers.Layer.Vector("Selection", {styleMap: 
    new OpenLayers.Style(OpenLayers.Feature.Vector.style["select"])
});
map.addLayers([layer, vectorLayer, select]);
var control = new OpenLayers.Control.GetFeature({
                protocol: wfs,
                multipleKey: "shiftKey",
                toggleKey: "ctrlKey"
});
control.events.register("featureselected", this, function(e) {
    select.addFeatures([e.feature]);
});


Once I get my feature via the GetFeature control and edit it, how do I save
it back to its WFS?
   
1) http://openlayers.org/dev/examples/getfeature-wfs.html

Thanks!
Ashley
-- 
View this message in context: http://osgeo-org.1803224.n2.nabble.com/WFS-GetFeature-Example-tp5432404p5432404.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.



More information about the Users mailing list