[OpenLayers-Users] GetFeature and reprojection GET Method

Christoph Ratke christoph.ratke at gmx.net
Tue Jan 19 03:37:08 EST 2010


Hi all,

I am trying to realize a GetFeature request on EPSG:4326 WFS 1.0.0 data 
over a EPSG:900913 projected Google base layer. As another restriction I 
have to use the http GET method.

I got the WFS overlay working like this:
    var p = new OpenLayers.Protocol.HTTP({
        url: "wfsURL",
        ...some more params...
        format: new OpenLayers.Format.GML(
        {
          internalProjection:mapProjection,
          externalProjection:displayProjection
        }) 
    });
    var l = new OpenLayers.Layer.Vector("GML",
        {strategies: [new OpenLayers.Strategy.Fixed({preload:false})], 
         protocol: p
        });
Maybe the WFS Layer is looking a bit strange but it was the only way to 
get it up and running. Anyway using the getFeatureControl is not working 
because the bounding box is not reprojected. It is requested in 
EPSG:900913 but I need a EPSG:4326 BBox).
I was not able to reproject the BBox myself. How could I do so? Do you 
have any suggestions?

Thank you in advance.
Christoph








More information about the Users mailing list