Hi, Your code snippet for google epsg:4326 and your wfs works. I have tried. Also the WFS request http://www.bsc-eoc.org/cgi-bin/bsc_ows.asp?typename=OWLS&SERVICE=WFS&VERSION =1.0.0&REQUEST=GetFeature&SRS=EPSG%3A4326&BBOX=-205.46875,-45.46875,5.46875, 165.46875 returns the features.
The problem is the right configuration of your proxy script or your proxy script have failures. Arnd Wippermann -----Ursprüngliche Nachricht----- Von: [email protected] [mailto:[email protected]] Im Auftrag von Kai Behncke Gesendet: Dienstag, 3. Februar 2009 20:39 An: [email protected] Betreff: Re: [OpenLayers-Users] Visualizing WFS in Open Layers Dear Till and Arnd, thank you for your hints. >Just add the 900913 def to your local epsg file and add the epsg code >900913 to your mapfiles header should do the job... I tried that but so far with no success, and I wonder if it should work also with 4326, because I reprojected the whole Map to 4326?? var options = { maxExtent: new OpenLayers.Bounds(7.9189,52.2102,8.1716,52.3467), units: 'dd', projection: "EPSG:4326" }; ...and the WMS I have is also in 4326 and seems to lay correctly above the google-data. To come to the target step-by-step without eventually projection-mismatch I try the data from WFS-Example now: function init(){ OpenLayers.ProxyHost="/cgi-bin/proxy.cgi?url="; map = new OpenLayers.Map('map'); layer = new OpenLayers.Layer.WMS( "OpenLayers WMS", "http://labs.metacarta.com/wms/vmap0", {layers: 'basic'} ); map.addLayer(layer); layer = new OpenLayers.Layer.WFS( "Owl Survey", "http://www.bsc-eoc.org/cgi-bin/bsc_ows.asp?", {typename: "OWLS"}, { featureClass: OpenLayers.Feature.WFS}); map.addLayer(layer); map.addControl(new OpenLayers.Control.LayerSwitcher()); map.setCenter(new OpenLayers.LonLat(-100, 60), 3); } ...but also there on my development server the wfs is not visualized??? I set the proxy.cgi to the servers cgi-bin but without success (the proxy-cgi is executable and readable by the apache-group). Definetely cgi-scripts are parsed (I tested it with a little "Hello-World"-Python-Cgi. Bugtracker gives me after loading wfs.html in "red" a http://www.gastronomap.de/cgi-bin/proxy.cgi?url=http%3A%2F%2Fwww.bsc-eoc.org %2Fcgi-bin%2Fbsc_ows.asp% 3Ftypename%3DOWLS%26SERVICE%3DWFS%26VERSION%3D1.0.0%26REQUEST%3DGetFeature%2 6SRS%3DEPSG%253A4326%26BBOX% 3D-205.46875%2C-45.46875%2C5.46875%2C165.46875 ....if I open that in a browser nothing at all occurs, puh.... I wonder what else might create that error,hmmmmm, well maybe tomorrow I will find a solution. Best regards, Kai -------- Original-Nachricht -------- > Datum: Tue, 3 Feb 2009 19:14:37 +0100 > Von: Till Adams <[email protected]> > An: Kai Behncke <[email protected]>, [email protected] > Betreff: Re: [OpenLayers-Users] Visualizing WFS in Open Layers > Kai, > > looksl ike you trapped into the problem of the google projection, > because google's data aren't in 4326, they have their own projection > and u have to reproject your stuff to the googles stuff (google at > epsg code 900913 - oir there is a new one I do not know yet...) > > Just add the 900913 def to your local epsg file and add the epsg code > 900913 > to your mapfiles header should do the job... > > Regards, Till > > > > > "Kai Behncke" <[email protected]> schrieb: > > Dear Users, > > > > In the OpenLayers Tutorium I read that it`s possible to include and > visualize a > > WFS, but somehow it doesn`t work with mine. > > > > The WFS (via UMN MapServer) seems to be correct: > > > > > > > http://85.214.90.79/cgi-bin/mapserv_ol.sh?SERVICE=WFS&VERSION=1.0.0&Re > quest=GetFeature&Typename=gastronomie_wfs > > > > But if I try to include it on top of a google layer it doesn`t > > appear > (It > > shouldn`t be because of the projection, because a WMS with the > > specific parameters appears properly). > > > > I include it via: > > > > > > -------------- > > > > function init() { > > var options = { > > maxExtent: new OpenLayers.Bounds(7.9189,52.2102,8.1716,52.3467), > > units: 'dd', > > projection: "EPSG:4326" > > }; > > map = new OpenLayers.Map('map',options); > > > > > > var gphy = new OpenLayers.Layer.Google( "Google Physical",{type: > > G_PHYSICAL_MAP}); > > > > var gastronomap_wfs= new OpenLayers.Layer.WFS( "small_wfs", > > "http://85.214.90.79/cgi-bin/mapserv_ol.sh?", > > {Typename: 'gastronomie_wfs'}); > > > > > > map.addLayers([gastronomap_wfs,gphy]); > > map.addControl(new OpenLayers.Control.LayerSwitcher()); > > map.zoomToMaxExtent();} > > > > --------------- > > > > Can anybody help? > > Thank you very much in advance, Kai > > -- > > Jetzt 1 Monat kostenlos! GMX FreeDSL - Telefonanschluss + DSL für > > nur 17,95 Euro/mtl.!* http://dsl.gmx.de/?ac=OM.AD.PD003K11308T4569a > > _______________________________________________ > > Users mailing list > > [email protected] > > http://openlayers.org/mailman/listinfo/users > > > > > -- Jetzt 1 Monat kostenlos! GMX FreeDSL - Telefonanschluss + DSL für nur 17,95 Euro/mtl.!* http://dsl.gmx.de/?ac=OM.AD.PD003K11308T4569a _______________________________________________ Users mailing list [email protected] http://openlayers.org/mailman/listinfo/users _______________________________________________ Users mailing list [email protected] http://openlayers.org/mailman/listinfo/users
