[OpenLayers-Users] Changing map projections for WMS layers

Jon Blower jdb at mail.nerc-essc.ac.uk
Fri May 2 11:14:08 EDT 2008


Hi all,

I am developing a WMS-based visualization site using OpenLayers and
I'd like to have the capability to change the projection of the map.
The map is created using EPSG:4326 but I'd like to be able to change
this dynamically to EPSG:32661 (north polar stereographic).  (so that
I can display layers from NSIDC, amongst others:
http://nsidc.org/data/atlas/ogc_services.html).

I've tried changing the projection like this:

map.setOptions({
    projection: "EPSG:32661",
    maxExtent: new OpenLayers.Bounds(-10700000, -10700000, 14700000, 14700000)
});

but nothing seems to happen.  The map doesn't change at all, even if I
zoom or pan.  Images are still requested using EPSG:4326 and the
extent remains unchanged.  (The base layer WMS can accept either
EPSG:4326 or EPSG:32661.)

All the layers on my map are WMS layers.

Do I need to change the projection of all the layers I'm viewing
individually?  If so, what is the purpose of the projection of the map
object?

Thanks in advance,
Jon

-- 
--------------------------------------------------------------
Dr Jon Blower Tel: +44 118 378 5213 (direct line)
Technical Director Tel: +44 118 378 8741 (ESSC)
Reading e-Science Centre Fax: +44 118 378 6413
ESSC Email: jdb at mail.nerc-essc.ac.uk
University of Reading
3 Earley Gate
Reading RG6 6AL, UK
--------------------------------------------------------------



More information about the Users mailing list