[OpenLayers-Users] Difference between WMS and WFS on the same
Geoserver Layer
Gabriele Seitz
ml-seitz at web.de
Fri Oct 21 05:03:28 EDT 2011
Hi there,
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 correct. What's wrong with the WMS?
var options = {
controls: [],
projection: new OpenLayers.Projection("EPSG:4326"),
displayProjection: new OpenLayers.Projection("EPSG:4326"),
units: 'm',
numZoomLevels: 18,
maxResolution: 156543.0339,
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]);
Thanks for answering.
Gabriele
--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/Difference-between-WMS-and-WFS-on-the-same-Geoserver-Layer-tp6916291p6916291.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
More information about the Users
mailing list