[OpenLayers-Users] proj4js with wms + wfs: troubles getting both two working

Ian Turton ijturton at gmail.com
Mon Feb 14 13:57:29 EST 2011


2011/2/14 Andrés Maneiro <amaneiro at icarto.es>:
> Hi there,
>
> I've got a weird behaviour when using proj4js with WMS layer.
>
> Some of the vector data I'm playing with are in EPSG:23029, so I need
> proj4js to show WFS data (script included by script tag in HTML). Now, the
> problem appears when I try to include WMS data too.
>
> I'm using this code:
>
> - HTML code: http://pastebin.com/ck7SUj9J
> - js code: http://pastebin.com/RS1aaq5d
>
> That's weird because if I delete the proj4js call in HTML (lines 9 and 10),
> the WMS map will show... but -obviously- the WFS features not.

Since you are using WFS 1.1.0 you can just let GeoServer do the
reprojection for you. Just ask for the WFS vectors in mercator.

Ian
-- 
Ian Turton


More information about the Users mailing list