[OpenLayers-Users] changes in wms between 2.4 and 2.6

Christopher Schmidt crschmidt at metacarta.com
Tue Apr 22 12:23:29 EDT 2008


On Tue, Apr 22, 2008 at 05:14:20PM +0100, Joanne Cook wrote:
> Hi all,
> 
> I am wondering if there have been any changes in the way wms is handled between openlayers 2.4 and 2.6. I went to upgrade my site from one to the other, and found that my wms layers display in a different location, when all I've changed is the line that says to look in folder Openlayers-2.6 rather than 2.4 for the javascript.(I even downloaded a clean copy of 2.4 to check it wasn't any changes I had made). 
> 
> It looks like a projection issue- you can see the difference if you look at the following:
> 
> http://mapdata.thehumanjourney.net uses 2.4
> http://mapdata.thehumanjourney.net/index_26.html uses 2.6
> 
> If you zoom in far enough to engage the wfs, then sites are in the correct location in both versions of the map.
> 
> Can anyone help me with this- or give me an idea how to debug it?

In 2.5, we turned the default 'reproject' option on WMS layers to
'false', because it offers a false sense of success in overlaying raster
layers of different projections which isn't really accurate.

Setting reproject: true should fix this issue for use now, but you
should really at some point look into using SphericalMercator:
http://crschmidt.net/~crschmidt/spherical_mercator.html explains some of
the how.

Regards,
-- 
Christopher Schmidt
MetaCarta



More information about the Users mailing list