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

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Tue Apr 7 14:32:47 EDT 2009


Author: christoph
Date: 2009-04-07 14:32:47 -0400 (Tue, 07 Apr 2009)
New Revision: 3865

Modified:
   trunk/mapbender/http/javascripts/mod_setBBOX1.php
Log:
http://trac.osgeo.org/mapbender/ticket/433

Modified: trunk/mapbender/http/javascripts/mod_setBBOX1.php
===================================================================
--- trunk/mapbender/http/javascripts/mod_setBBOX1.php	2009-04-07 18:30:56 UTC (rev 3864)
+++ trunk/mapbender/http/javascripts/mod_setBBOX1.php	2009-04-07 18:32:47 UTC (rev 3865)
@@ -28,8 +28,21 @@
 	var myBBOX = "<?php echo $_SESSION['mb_myBBOX'] ?>";
 	for(var i=0; i<my_target.length; i++){
 		if(myBBOX != ""){
-			var coord = myBBOX.split(","); 
-			mb_calculateExtent(my_target[i],parseFloat(coord[0]),parseFloat(coord[1]),parseFloat(coord[2]),parseFloat(coord[3]));
+			var mapObj = getMapObjByName(my_target);
+			if (mapObj) {
+				var coord = myBBOX.split(","); 
+				var newExtent = new Extent(parseFloat(coord[0]),parseFloat(coord[1]),parseFloat(coord[2]),parseFloat(coord[3]));
+
+				// if the restrictedExtent attribute exists, it has been 
+				// configured by the user in the element variable.
+				// This is an indicator, that the administrator wants to
+				// set the restricted extent coming from request variables.
+				if (mapObj.restrictedExtent) {
+					mapObj.setRestrictedExtent(newExtent);
+				}
+				mapObj.calculateExtent(newExtent);				
+
+			}
 		}
 	}
 }



More information about the Mapbender_commits mailing list