[Mapbender-commits] r4467 - branches/print_dev/http/classes

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Mon Aug 3 12:16:31 EDT 2009


Author: mschulz
Date: 2009-08-03 12:16:30 -0400 (Mon, 03 Aug 2009)
New Revision: 4467

Modified:
   branches/print_dev/http/classes/class_map.php
Log:
merged local and trunk changes

Modified: branches/print_dev/http/classes/class_map.php
===================================================================
--- branches/print_dev/http/classes/class_map.php	2009-08-03 15:39:50 UTC (rev 4466)
+++ branches/print_dev/http/classes/class_map.php	2009-08-03 16:16:30 UTC (rev 4467)
@@ -9,7 +9,7 @@
 	private $width;
 	private $height;
 	private $frameName;
-	private $elementName = "maps";
+	private $elementName;
 	private $extent;
 	private $zoomFullExtentArray = array();
 	private $isOverview = false;
@@ -46,7 +46,7 @@
 	public function getWidth () {
 		return $this->width;
 	}
-	
+
 	/**
 	 * @param $value Integer
 	 */
@@ -89,7 +89,6 @@
 	 * @return
 	 */
 	public function addZoomFullExtent ($aMapbenderBbox) {
-		$e = new mb_exception("adding new box: " . $aMapbenderBbox);
 		array_push($this->zoomFullExtentArray, $aMapbenderBbox);
 	}
 	
@@ -297,7 +296,8 @@
 
 		$this->width = $jsMapObject->width;
 		$this->height = $jsMapObject->height;
-		$this->frameName = $jsMapObject->frameName;
+		// there are no more map frames in Mapbender 2.6
+		$this->frameName = $jsMapObject->elementName;
 		$this->extent = $bbox;
 		
 		if (isset($jsMapObject->isOverview) && $jsMapObject->isOverview == "1") {
@@ -363,6 +363,7 @@
 				$newLayer->gui_layer_status = $currentLayer->gui_layer_status;
 				$newLayer->gui_layer_style = $currentLayer->gui_layer_style;
 				$newLayer->gui_layer_selectable = $currentLayer->gui_layer_selectable;
+
 				if ($this->isOverview) {
 					preg_match_all("/LAYERS\=([^&]*)/", $jsMapObject->mapURL[0], $resultMatrix);
 					$layerList = $resultMatrix[1][0];
@@ -436,9 +437,10 @@
 		if ($wmsIndex === null) {
 			$wmsIndex = "null";
 		}
-		$registerMapString = "mb_registerMapObj('" . 
-			$this->frameName . "', " . 
-			"'maps', " . 
+
+		// syntax has changed in 2.6! Map is no longer a frame
+		$registerMapString = "mb_registerMapObj('', " . 
+			"'" . $this->frameName . "', " . 
 			$wmsIndex . ", " . 
 			$this->width . ", " . 
 			$this->height . ");"; 



More information about the Mapbender_commits mailing list