[OpenLayers-Users] Switching projection on loaded map

Fabian Patzke patzke at geoinformationsdienst.de
Tue Jun 2 09:06:58 EDT 2009


Hi,
I want to build an option in my OL map app so that a user can switch the used
projection of the map to another.
For example my map is in EPSG:4326. Than I add some layers to the map and the
user can use the map. If one want it should be possible to switch to EPSG:32632
via a button and the map should be reloaded with the new projection.

My problem is, that it is not possible to set the map.projection once a layer
has been added. I've tried it and it can only be set with map.setOptions(...) as
long no layer has been loaded.

Is there an easy way to reload/redraw/recreate the map or do I have to destroy
the map an build it up with a new projection by hand?

Thanks in advance
Greetings Fabian






More information about the Users mailing list