[OpenLayers-Users] WFS GetFeature Example
Alexandre Dube
adube at mapgears.com
Tue Aug 17 11:27:29 EDT 2010
Ashley,
This is not the example you should be looking for, see this one instead :
http://www.openlayers.org/dev/examples/wfs-protocol-transactions.html
Regards,
Alexandre
On 10-08-17 11:20 AM, mortac8 wrote:
> 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
>
--
Alexandre Dubé
Mapgears
www.mapgears.com
More information about the Users
mailing list