AW: [OpenLayers-Users] Difference between WMS and WFS on the
sameGeoserver Layer
Arnd Wippermann
arnd.wippermann at web.de
Fri Oct 21 15:00:47 EDT 2011
You should change your map options, so that they meet the choosen
projection:
var options = {
controls: [],
projection: new OpenLayers.Projection("EPSG:4326"),
displayProjection: new OpenLayers.Projection("EPSG:4326"),
units: 'dd',
numZoomLevels: 16,
maxResolution: 1.40625,
maxExtent: new OpenLayers.Bounds(-180,-90,180,90)
};
Perhaps that solves it.
Arnd
-----Ursprüngliche Nachricht-----
Von: openlayers-users-bounces at lists.osgeo.org
[mailto:openlayers-users-bounces at lists.osgeo.org] Im Auftrag von Gabriele
Seitz
Gesendet: Freitag, 21. Oktober 2011 11:03
An: users at openlayers.org
Betreff: [OpenLayers-Users] Difference between WMS and WFS on the
sameGeoserver Layer
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.
_______________________________________________
Users mailing list
Users at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/openlayers-users
More information about the Users
mailing list