[OpenLayers-Users] wfs with mapserver

Burgholzer,Robert rwburgholzer at deq.virginia.gov
Thu Oct 11 09:21:46 EDT 2007


Tasslehoff66, 
My problem ended up being because I had a couple of difficulties, I will
try to enumerate them here (HTH!), although they may not be in the most
useful order:

1. Projection troubles, I had a mix of "proj=latlon" and
"init=epsg:4326", they have no problem co-existing under normal map
server operation, and WMS, however, under WFS they seemed to be a deal
breaker.
2. Make sure that you go through the "must haves" in:
http://mapserver.gis.umn.edu/docs/howto/wfs_server  there are a number
of deal-breakers here as well.
3. Make sure that you can query the server from an URL, and get properly
formatted WFS XML output, i.e., 
../cgi-bin/mapserv.exe?map=/ms4w/apps/tutorial/htdocs/testwfs.map&typena
me=proj_points&SERVICE=WFS&VERSION=1.0.0&REQUEST=GetFeature

where "typename" is the name of some layer that you have in your mapfile
(mine is "proj_points").  Below is my version:

http://172.16.210.66/cgi-bin/mapserv.exe?map=C:/usr/local/home/httpd/uci
tool//map_proj3.map&typename=proj_points&SERVICE=WFS&VERSION=1.0.0&REQUE
ST=GetFeature

4. Check that your map location is correct, the "../cgi-bin" reference
in your setup seems that it could be a problem. Maybe "/cgi-bin" without
the ".." in front would work?

5. Finally, check that the URL of your page, and the URL of the map have
the same base IP.  I ran into trouble because I was loading my page in
my browser as "localhost", and I had my map defined as "172.16.xx.yy".
When this occurs, the openlayers wishes there to be a proxy defined, and
this is troublesome.  By typing in the proper IP "172..." in my browser,
I was golden.


Good luck!

Robert W. Burgholzer
Surface Water Modeler
Office of Water Supply and Planning
Virginia Department of Environmental Quality
rwburgholzer at deq.virginia.gov
804-698-4405
Open Source Modeling Tools:
http://sourceforge.net/projects/npsource/
Web-Based Water Supply Planning Demo:
http://soulswimmer.dynalias.net/models/wsdemo/demo_hsi.php

-----Original Message-----
From: tasslehoff66 at hotmail.com [mailto:tasslehoff66 at hotmail.com] 
Sent: Thursday, October 11, 2007 8:53 AM
To: Burgholzer,Robert
Subject: wfs with mapserver

Hi Robert,
I'm trying to test openlayers' wfs with MapServer, and ran into the same
problem as you did - the screen showing blank. I'm wondering how you set
up the locations, since it might be what's going wrong for me. Mine is
set as follows:
http://localhost/openlayers/wfs_mapserv.html for the html file.
"../cgi-bin/mapserv.exe?map=/ms4w/apps/tutorial/htdocs/testwfs.map" for
the map file.
I went through the steps you did also, setting the wfs layer as the base
layer and the layer projection.
Thanks for your help.



More information about the Users mailing list