[Mapbender-commits] r9571 - trunk/mapbender/http/classes

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Fri Sep 2 05:35:38 PDT 2016


Author: armin11
Date: 2016-09-02 05:35:38 -0700 (Fri, 02 Sep 2016)
New Revision: 9571

Modified:
   trunk/mapbender/http/classes/class_map.php
   trunk/mapbender/http/classes/class_wmc.php
   trunk/mapbender/http/classes/class_wms.php
Log:
New functions for support of wms dimension parameters

Modified: trunk/mapbender/http/classes/class_map.php
===================================================================
--- trunk/mapbender/http/classes/class_map.php	2016-09-02 12:35:17 UTC (rev 9570)
+++ trunk/mapbender/http/classes/class_map.php	2016-09-02 12:35:38 UTC (rev 9571)
@@ -523,7 +523,6 @@
 			$currentWms = $jsMapObject->wms[$i];
 			//$e = new mb_exception("class_map.php: json map object: ".json_encode($jsMapObject));
 			$wms = new wms();
-
 			//
 			// set WMS data
 			//
@@ -542,6 +541,8 @@
 			$wms->gui_maxx = $currentWms->gui_maxx;
 			$wms->gui_maxy = $currentWms->gui_maxy;
 			$wms->gui_wms_mapformat = $currentWms->gui_wms_mapformat;
+			$wms->gui_wms_dimension_time = false;
+			$wms->gui_wms_dimension_elevation = false;
 			$wms->gui_wms_featureinfoformat = $currentWms->gui_wms_featureinfoformat;
 			$wms->gui_wms_exceptionformat = $currentWms->gui_wms_exceptionformat;
 			$e = new mb_notice('class_map: gui_wms_mapopacity: '.$currentWms->gui_wms_mapopacity);
@@ -611,7 +612,6 @@
 					$newLayer->layer_epsg[$z]["maxx"] = $currentLayer->layer_epsg[$z]->maxx;
 					$newLayer->layer_epsg[$z]["maxy"] = $currentLayer->layer_epsg[$z]->maxy;
 				}
-
 				// BEWARE THIS IS SUPER UGLY CODE
 				$newLayer->layer_style = array();
 				for ($z = 0; $z < count($currentLayer->layer_style); $z++) {
@@ -626,15 +626,10 @@
 				$indexDimension = count($newLayer->layer_dimension);
 				
 				foreach($currentLayer->layer_dimension as $dimension) {
-					//$dimensionAttributes = array(); 
 					foreach(get_object_vars($dimension) as $key=>$value) {
-						//$dimensionAttributes[$key] = $value;
-  						//$newLayer->layer_dimension[] = array($key => $value);
-						//$e = new mb_exception("class_map.php: (from map object to layer object) dimension attribute: ".$key." - with value: ".$value);
 						$newLayer->layer_dimension[$indexDimension]->$key = $value;
 					}	
 					$indexDimension++;
-					//$newLayer->layer_dimension[] = 
 				}
 			}
 			array_push($this->wmsArray, $wms);
@@ -642,7 +637,6 @@
 		return true;
 	}
 
-
 	// ------------------------------------------------------------------------
 	// database functions
 	// ------------------------------------------------------------------------

Modified: trunk/mapbender/http/classes/class_wmc.php
===================================================================
--- trunk/mapbender/http/classes/class_wmc.php	2016-09-02 12:35:17 UTC (rev 9570)
+++ trunk/mapbender/http/classes/class_wmc.php	2016-09-02 12:35:38 UTC (rev 9571)
@@ -2102,6 +2102,12 @@
 			$wms->gui_wms_visible = $currentLayer["extension"]["WMS_VISIBLE"];
 			$wms->gui_wms_opacity = $currentLayer["extension"]["GUI_WMS_OPACITY"];
 			$wms->gui_wms_sldurl = $currentLayer["style"][$styleIndex]["sld_url"];
+
+			//things for dimension
+			$wms->gui_wms_dimension_time = false;
+			$wms->gui_wms_dimension_elevation = false;
+			
+			
 			$wms->wms_srs = $currentLayer["epsg"];
 			$wms->gui_epsg = $currentLayer["epsg"];
 			//

Modified: trunk/mapbender/http/classes/class_wms.php
===================================================================
--- trunk/mapbender/http/classes/class_wms.php	2016-09-02 12:35:17 UTC (rev 9570)
+++ trunk/mapbender/http/classes/class_wms.php	2016-09-02 12:35:38 UTC (rev 9571)
@@ -69,6 +69,9 @@
 	var $gui_wms_exceptionformat;
 	var $gui_wms_epsg;
 	var $gui_wms_sldurl;
+
+	var $gui_wms_dimension_time;
+	var $gui_wms_dimension_elevation;
 	  
 	var $default_epsg = 0;
 	var $overwrite = true;
@@ -1587,7 +1590,9 @@
 				"'" . $this->gui_wms_epsg ."'," .
 				"'" . $this->gui_wms_visible ."'," .
 				"'" . $this->gui_wms_opacity ."'," .
-				"'" . $this->gui_wms_sldurl ."" .
+				"'" . $this->gui_wms_sldurl ."'," .
+				"'" . $this->gui_wms_dimension_time ."'," .
+				"'" . $this->gui_wms_dimension_elevation ."" .
 				"');";
 		$str .=  $add_wms_string;
 		//add possible data formats
@@ -1722,7 +1727,9 @@
 			$this->gui_wms_epsg ."','". 
 			$this->gui_wms_visible ."','".
 			$this->gui_wms_opacity ."','".
-			$this->gui_wms_sldurl ."');");
+			$this->gui_wms_sldurl ."','".
+			$this->gui_wms_dimension_time ."','".
+			$this->gui_wms_dimension_elevation ."');");
 			
 		for($i=0;$i<count($this->data_format);$i++){
 			if($parent){
@@ -3407,7 +3414,8 @@
 			$this->gui_wms_visible = $row["gui_wms_visible"];
 			$this->gui_wms_opacity = $row["gui_wms_opacity"];
 			$this->gui_wms_sldurl = $row["gui_wms_sldurl"];
-	  
+			$this->gui_wms_dimension_time = false;
+	  		$this->gui_wms_dimension_elevation = false;
 			$sql = "Select * from wms where wms_id = $1 ";
 			$v = array($wms_id);
 			$t = array('i');
@@ -3686,13 +3694,18 @@
 			$this->wms_max_imagesize = $row2["wms_max_imagesize"];
 			$this->inspire_annual_requests = $row2["inspire_annual_requests"];
 
-			#some default
+			//some default values
 			$this->gui_wms_visible = 1;
 			$this->gui_wms_opacity = 100;
+			$this->gui_wms_dimension_time = false;
+			$this->gui_wms_dimension_elevation = false;
 			//the following things are not given without a special gui!!!!!
 			$this->gui_wms_epsg=$row["gui_wms_epsg"];
 			$this->gui_wms_sldurl = $row["gui_wms_sldurl"];
-			
+			//default
+			$this->gui_wms_dimension_time = false;
+			$this->gui_wms_dimension_elevation = false;
+
 			if($this->wms_version == "1.0.0"){
 			    $this->gui_wms_mapformat = "PNG";
 			    $this->gui_wms_featureinfoformat = "MIME";



More information about the Mapbender_commits mailing list