Difference between WMS and WFS on the same Geoserver Layer

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Difference between WMS and WFS on the same Geoserver Layer

Gabriele Seitz
Hi there,

in OL-List I got the hint, to post my question here as well, because it might be a geoserver issue (http://osgeo-org.1803224.n2.nabble.com/Difference-between-WMS-and-WFS-on-the-same-Geoserver-Layer-td6916291.html#a6920153).

the point features in these two layers differ for about 300 meters.
They use the same Geoserver (2.1.1) layer. Native SRS  is EPSG:900913, Declared SRS is EPSG:4236. The WFS is placed correctly. What's wrong with the WMS?

var options = {
        controls: [],
        projection: new OpenLayers.Projection("EPSG:4326"),
        displayProjection: new OpenLayers.Projection("EPSG:4326"),
        maxExtent: new OpenLayers.Bounds(-20037508, -20037508, 20037508,20037508.34)
};

var flaglayer = new OpenLayers.Layer.WMS("WMS",
        "http://domain/geoserver/basic/wms",
        {layers:"basic:gis_elemente",transparent:true});
map.addLayers([flaglayer ]);    

var prueflayer =new OpenLayers.Layer.Vector("Vector", {
        strategies: [new OpenLayers.Strategy.BBOX()],
        protocol: new OpenLayers.Protocol.WFS({
                url:  "http://domain/geoserver/wfs",
                featureType: "gis_elemente",
                featureNS: "http://domain/geoserver/basic",
        })
                               
});
map.addLayers([prueflayer]);

What do I have to check with Geoserver, to make sure, that the mistake is not on geoserver side?

Thanks for answering.

Gabriele