Hi again!<br><br>Iīve been searching and trying to solve this big problem, but I didnīt succeed unfortunately.<br><br>My problem is I have a requirement to make a drop down menu to change the projection (SRS). <br><br>After searching for days, I found very little information about this, and I donīt understand why, because in Spain there are some viewers working with this funcionality, like this example:<br>
<br><a href="http://www.idee.es/clientesIGN/wmsGenericClient/index.html?lang=EN">http://www.idee.es/clientesIGN/wmsGenericClient/index.html?lang=EN</a><br clear="all"><br>Iīve tried to change the projection in the current map object like this way:<br>
<br>map.setOptions({projection:...,maxExtent:...});<br><br>and I changed every layer projection iterating all layers in map like this:<br><br>for (i=0;i<map.layers.length;i++){<br> var layer=map.layers[i];<br> layer.projection=new OpenLayers.Projection(...);<br>
layer.mergeNewParams({foo:"FOO"}); //DOING THIS TO REFRESH THE LAYER WITH NEW DATA<br><br>}<br><br>After doing this, no image is showed. After some investigation, I saw that in the URL of every tile image of every layer (GetMap service) the "SRS" param was ok, but the BBOX param wasnīt refreshed with the new BBOX (maxExtent). Another thing I found is that the mouse position wasnīt updated with the new projection.<br>
<br>Please, could you tell me some efficient way and compatible with future versions of OpenLayers for changing the map projection (I mean map and every overlay of course).<br><br>Thanks you very much!<br><br><br>Juan G<br>