[OpenLayers-Users] Visualizing WFS in Open Layers

Till Adams adams at terrestris.de
Tue Feb 3 13:14:37 EST 2009


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" <Kai-Behncke at gmx.de> 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&Request=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
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users
> 
> 





More information about the Users mailing list