[OpenLayers-Users] wms-layer is shifted from the corresponding wfs-layer (EPSG:31467)

Marco Scheuble mail at marco-scheuble.de
Tue Aug 18 09:18:45 EDT 2009


I solved the problem, by changing the vectorLayer-definition!

1. changing the projectin from EPSG: 4326 to EPSG: 31467
2. put the attribute srsName:"EPSG:31467" into the wfs-protocol-definition

var pet  = new OpenLayers.Layer.Vector( 'WFS-Point', {
		strategies: [new OpenLayers.Strategy.BBOX(), saveStrategy ], 
		projection: new OpenLayers.Projection("EPSG:31467"),
		styleMap: styles, 
		protocol: new OpenLayers.Protocol.WFS({ 
			version: '1.1.0', 
			srsName: 'EPSG:31467', 
			url: '/geoserver/wfs', 
			featureNS :  'http://www.openplans.org/topp', 
			featureType: 'pet', 
			geometryName: 'the_geom'})
			});




Marco Scheuble wrote:
> 
> Hi Everyone,
> 
> My problem is the overlay of wms- and wfs-layers of the same data.
> the wms-layers are shifted 2m south and 0.5m east from the wfs-layers. 
> 
> ->  http://tp-work.terragis.de:81/openlayers/ol_versatz.jpg See picture 
> ->  http://tp-work.terragis.de:81/openlayers/ol_versatz.html Here is the
> code 
> 
> Maybe anyone can help me?!
> Thanks,
> 
> Marco
> 
> 

-- 
View this message in context: http://n2.nabble.com/wms-layer-is-shifted-from-the-corresponding-wfs-layer-%28EPSG%3A31467%29-tp3464981p3465968.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.



More information about the Users mailing list