[OpenLayers-Users] How do I change the commit URL for a WFS layer?or something ...

bradleyspencer brad at cubewerx.com.au
Fri Feb 22 21:43:08 EST 2008


Stephen,

I think I had a similar problem. I was not been able to do WFS requests from
within OL as I am not able to set up the proxy required to do this - at
least that is what I think the problem is.

Anyway, my work around is probably clunky but works quite well. I do the
following.
1. I collect all the information I need from interactive user to make a WFS
request. In my case, this also gets from the user a Shift-LeftMouse bounding
box used as the BBox search criteria.
2. I pass all that to a server-side php script which decodes it and
reassembles it into a WFS request and then submits it to the CubeSERV WFS
server.
3. This will return a GML file.
4. I them return to the OL client using standard Ajax the GML which I can
parse locally and draw a vector layer with OL methods.

This works for me but I am not posting data into a database but I would
expect the php program could easily do that if the server supports WFS-T.

Hope that helps.

Brad Spencer

-----Original Message-----
From: users-bounces at openlayers.org [mailto:users-bounces at openlayers.org]On
Behalf Of Stephen Woodbridge
Sent: Saturday, 23 February 2008 3:48 AM
To: openlayers user list
Subject: [OpenLayers-Users] How do I change the commit URL for a WFS
layer?or something ...

Hi all,

I'm trying to get a simple vector editing demo working.

I setup:

1) a wms base layer
2) a wfs layer based on mapserver

when I click a save button, that calls commit on the wfs layer it is
sending the transaction back to mapserver which I know can not handle
the request. This much is working as far as it goes.

So I'm thinking that if I can change the commit URL to send the
transaction to say http://myhost/wfs-save.php

Then I can make that parse the results and write the request to postgis
where the wfs layer is pulling its geometry from.

Would this work? or am chasing a rabbit down a nasty hole?

How does wfs-save.php need to respond to the save request to keep
OpenLayers happy?

Is there a better way to do this with mapserver?

-Steve W
_______________________________________________
Users mailing list
Users at openlayers.org
http://openlayers.org/mailman/listinfo/users




More information about the Users mailing list