[Mapbender-commits] r5030 - trunk/mapbender/http/javascripts

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Tue Nov 24 08:26:03 EST 2009


Author: verenadiewald
Date: 2009-11-24 08:26:01 -0500 (Tue, 24 Nov 2009)
New Revision: 5030

Modified:
   trunk/mapbender/http/javascripts/mod_changeEPSG.js
Log:
set new setBoundingBoxBySrs for mapObj wms

Modified: trunk/mapbender/http/javascripts/mod_changeEPSG.js
===================================================================
--- trunk/mapbender/http/javascripts/mod_changeEPSG.js	2009-11-24 11:15:08 UTC (rev 5029)
+++ trunk/mapbender/http/javascripts/mod_changeEPSG.js	2009-11-24 13:26:01 UTC (rev 5030)
@@ -163,6 +163,12 @@
 				}
 				
 				var newExtent = obj;
+				var mapObjNames = [];
+				for(var i = 0; i < newExtent.length; i++) {
+					if (newExtent[i].frameName) {
+						mapObjNames.push(newExtent[i].frameName);
+					}
+				}
 				
 				for (var i = 0; i < newExtent.length; i++) {
 					if (newExtent[i].wms && !recalculateExtentOnly) {
@@ -177,6 +183,20 @@
 										parseFloat(newExtent[i].maxy)
 									)
 								);
+								
+								for (var k = 0; k < mapObjNames.length; k++) {
+						
+									var map = getMapObjByName(mapObjNames[k]);
+									map.wms[j].setBoundingBoxBySrs(
+										newExtent[i].newSrs,
+										new Extent(
+											parseFloat(newExtent[i].minx),
+											parseFloat(newExtent[i].miny),
+											parseFloat(newExtent[i].maxx),
+											parseFloat(newExtent[i].maxy)
+										)
+									);
+								}
 								break;
 							}
 						}



More information about the Mapbender_commits mailing list