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

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Wed Sep 7 05:43:50 PDT 2016


Author: armin11
Date: 2016-09-07 05:43:50 -0700 (Wed, 07 Sep 2016)
New Revision: 9579

Modified:
   trunk/mapbender/http/classes/class_wms.php
Log:
Further functions to allow support of wms time dimension

Modified: trunk/mapbender/http/classes/class_wms.php
===================================================================
--- trunk/mapbender/http/classes/class_wms.php	2016-09-07 12:42:40 UTC (rev 9578)
+++ trunk/mapbender/http/classes/class_wms.php	2016-09-07 12:43:50 UTC (rev 9579)
@@ -1553,8 +1553,8 @@
 			$newLayer->layer_style[$i]["legendurl"] = $currentLayer["style"][$i]["legendurl"];
 			$newLayer->layer_style[$i]["legendurl_format"] = $currentLayer["style"][$i]["legendurl_type"];
 		}
-		//2016-08-31 add dimension
-		$dimensionAttributes = array('name', 'units', 'unitSymbol', 'default', 'multipleValues', 'nearestValue', 'current', 'extent');
+		//2016-08-31 add dimension - user value come from wmc standard and client mapobject
+		$dimensionAttributes = array('name', 'units', 'unitSymbol', 'default', 'multipleValues', 'nearestValue', 'current', 'extent','userValue');
 		for ($i = 0; $i < count($currentLayer['dimension']); $i++) {
 			//$newLayer->layer_dimension[$i] = array();
 			foreach ($dimensionAttributes as $attributeName) {
@@ -1694,7 +1694,7 @@
 					$str .= "parent.";
 				}
 				//'name', 'units', 'unitSymbol', 'default', 'multipleValues', 'nearestValue', 'current', 'extent'
-				$dimensionString = "wms_addLayerDimension('".$this->objLayer[$i]->layer_dimension[$j]->name."', '".$this->objLayer[$i]->layer_dimension[$j]->units."', '".$this->objLayer[$i]->layer_dimension[$j]->unitSymbol."',  '".$this->objLayer[$i]->layer_dimension[$j]->default."',  '".$this->objLayer[$i]->layer_dimension[$j]->multipleValues."',  '".$this->objLayer[$i]->layer_dimension[$j]->nearestValue."',  '".$this->objLayer[$i]->layer_dimension[$j]->current."', '".$this->objLayer[$i]->layer_dimension[$j]->extent."');";
+				$dimensionString = "wms_addLayerDimension('".$this->objLayer[$i]->layer_dimension[$j]->name."', '".$this->objLayer[$i]->layer_dimension[$j]->units."', '".$this->objLayer[$i]->layer_dimension[$j]->unitSymbol."',  '".$this->objLayer[$i]->layer_dimension[$j]->default."',  '".$this->objLayer[$i]->layer_dimension[$j]->multipleValues."',  '".$this->objLayer[$i]->layer_dimension[$j]->nearestValue."',  '".$this->objLayer[$i]->layer_dimension[$j]->current."', '".$this->objLayer[$i]->layer_dimension[$j]->extent."','".$this->objLayer[$i]->layer_dimension[$j]->userValue."');";
 				//$e = new mb_exception("class_wms.php: dimensionstring= ".$dimensionString);
 				$str .= $dimensionString;
 			}
@@ -1802,7 +1802,7 @@
 				 echo "parent.";
 				}
 				//'name', 'units', 'unitSymbol', 'default', 'multipleValues', 'nearestValue', 'current', 'extent'
-				print("wms_addLayerDimension('".$this->objLayer[$i]->layer_dimension[$j]->name."', '".$this->objLayer[$i]->layer_dimension[$j]->units."', '".$this->objLayer[$i]->layer_dimension[$j]->unitSymbol."',  '".$this->objLayer[$i]->layer_dimension[$j]->default."',  '".$this->objLayer[$i]->layer_dimension[$j]->multipleValues."',  '".$this->objLayer[$i]->layer_dimension[$j]->nearestValue."',  '".$this->objLayer[$i]->layer_dimension[$j]->current."', '".$this->objLayer[$i]->layer_dimension[$j]->extent."');");
+				print("wms_addLayerDimension('".$this->objLayer[$i]->layer_dimension[$j]->name."', '".$this->objLayer[$i]->layer_dimension[$j]->units."', '".$this->objLayer[$i]->layer_dimension[$j]->unitSymbol."',  '".$this->objLayer[$i]->layer_dimension[$j]->default."',  '".$this->objLayer[$i]->layer_dimension[$j]->multipleValues."',  '".$this->objLayer[$i]->layer_dimension[$j]->nearestValue."',  '".$this->objLayer[$i]->layer_dimension[$j]->current."', '".$this->objLayer[$i]->layer_dimension[$j]->extent."','".$this->objLayer[$i]->layer_dimension[$j]->userValue."');");
 			}
 		   }	
 		}
@@ -3832,6 +3832,8 @@
 				foreach($attributeNames as $attribute) {
 					$this->objLayer[$layer_cnt]->layer_dimension[$count_layer_dimension]->{$attribute} = $row_dim[strtolower($attribute)];
 				}
+				//Initialize empty string for userValue from db cause this is only handled by wmc standard
+				$this->objLayer[$layer_cnt]->layer_dimension[$count_layer_dimension]->userValue = "";
 				$count_layer_dimension++;
 			}
 



More information about the Mapbender_commits mailing list