Still trying, and have no joy from the WFS layer.
I set the isBaseLayer: true, and this succeeded in removing the issue surrounding the javascript maxExtent error. I verified my projection info, wfs_srs and wms_srs are set to EPSG:4326, and my layer projection is now set to "init:EPSG:4326", however, I still get a blank map. My firebug skills are virtually non-existent, and I have stumbled around, failing to locate the request for the WFS-layer as Arnd recommended. At this point, I am totally flailing (and failing). Other details that might prove relevant, Mapserver 4.10 on windows, and as mentioned before, I get a properly formed XML document with all shape info and column values and attributes when doing an URL getFeature request. Can anyone who has set up a mapserver WFS request in OL possibly post the relevant excerpts from their map file, and javascript calls? I am somewhat at a loss as to other parameters, having tried the request with and without "featureClass: OpenLayers.Feature.WFS" in the additional parameters field. Thanks! r.b. -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Thursday, September 27, 2007 4:58 PM To: Burgholzer,Robert Cc: [email protected] Subject: AW: [OpenLayers-Users] trouble with WFS and Mapserver when you use FF with firebug, you can get the request for the WFS-layer. Something like this: http://geturl.asp?http%3A//localhost/mapserv.exe%3Fmap%3DTreppen.map <http://geturl.asp?http%3A/localhost/mapserv.exe%3Fmap%3DTreppen.map> %26typename%3DPOI %26maxfeatures%3D10 %26SERVICE%3DWFS %26VERSION%3D1.0.0 %26REQUEST%3DGetFeature %26SRS%3DEPSG%253A4326 %26BBOX%3D6.416875%2C50.556875%2C7.823125%2C51.963125 Retrieve the Url with your Internet Explorer and you should get some xml. If not than i would think your proxy is not right or your mapfile. If you cut the SRS and BBOX from the Url and then get an answer, it looks like you have a problem with the projections in your mapfile. To get my own WFS-layer working, i have learned 1. if the SRS in the request is the same as the WFS-layer, I only have to declare a projection in the layer block 2. if the SRS in the request is different from the WFS-layer, I have to declare the requested SRS as 'wfs_srs' 'EPSG:xxxx' in the WEB block and the projection in the LAYER block of the WFS-layer. Then my data will reproject and show in OpenLayers. You have also declare 'wms_srs' in the WEB block for the requested SRS. What I not understand, is, when I'm right with my mapfile, I must have for different requested SRS an own mapfile. Mit freundlichen GrĂ¼ssen Arnd Wippermann http://gis.ibbeck.de/ginfo/ _____ Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Im Auftrag von Burgholzer,Robert Gesendet: Donnerstag, 27. September 2007 22:06 An: [email protected] Betreff: [OpenLayers-Users] trouble with WFS and Mapserver I am having a hard time getting my mapserver to serve up WFS layers (or accessing them via OpenLayers, I really don't know which). I have tested the mapserver with WMS, and all is good. I am able to retrieve WFS data from mapserver via an URL request for getfeature, however, I get no success when trying to load it into openlayers via WFS, just a blank map. In the javascript error console, all I get is an error that the "maxExtent has no properties", indicating that there are no valid layers, I assume, which is of course evidenced by the fact that my map is blank. My creation statement and mapserver layer description is as follows: OL: layer1 = new OpenLayers.Layer.WFS( "poli_bounds", url, {'typename': 'poli_bounds'}, { typename: 'poli_bounds', featureNS: 'http://www.openplans.org/topp', extractAttributes: false } ); MAPFILE: LAYER CONNECTIONTYPE postgis CONNECTION "host=localhost user=postgres password=*** dbname=wsp" NAME poli_bounds GROUP poli_bounds TYPE POLYGON STATUS DEFAULT DUMP TRUE DATA "the_geom from poli_bounds" FILTER "1 = 1" TEMPLATE drought.html #MINSCALE 1000 #MAXSCALE 50000 LABELITEM "name" CLASS NAME "Political Boundaries" SYMBOL 'circle' SIZE 3 COLOR -1 -1 -1 BACKGROUNDCOLOR 0 0 0 OUTLINECOLOR 0 0 0 LABEL COLOR 8 8 174 #SHADOWCOLOR 218 218 218 #SHADOWSIZE 2 2 TYPE TRUETYPE FONT arial SIZE 7 ANTIALIAS TRUE POSITION CC PARTIALS FALSE MINDISTANCE 300 MINFEATURESIZE 30 BUFFER 4 #MINSCALE 1000 #MAXSCALE 50000 END # end of label END TOLERANCE 10 PROJECTION # EPSG SRID = 4326 "proj=latlong" END METADATA "DESCRIPTION" "Political Boundaries" "RESULT_FIELDS" "name county state" "wfs_title" "poli_bounds" ## REQUIRED "gml_featureid" "gid" ## REQUIRED "gml_include_items" "all" ## Optional (serves all attributes for layer) "title" "Political Boundaries" "tablename" "Political Boundaries" END END Robert W. Burgholzer Surface Water Modeler Office of Water Supply and Planning Virginia Department of Environmental Quality [EMAIL PROTECTED] 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
_______________________________________________ Users mailing list [email protected] http://openlayers.org/mailman/listinfo/users
