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

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Wed Jul 29 09:46:15 EDT 2009


Author: christoph
Date: 2009-07-29 09:46:14 -0400 (Wed, 29 Jul 2009)
New Revision: 4452

Modified:
   trunk/mapbender/http/classes/class_wms.php
Log:


Modified: trunk/mapbender/http/classes/class_wms.php
===================================================================
--- trunk/mapbender/http/classes/class_wms.php	2009-07-29 13:38:07 UTC (rev 4451)
+++ trunk/mapbender/http/classes/class_wms.php	2009-07-29 13:46:14 UTC (rev 4452)
@@ -35,6 +35,7 @@
 	var $wms_getfeatureinfo;
 	var $wms_getlegendurl;
 	var $wms_upload_url;
+	var $wms_srs = array();
 	  
 	var $fees;
 	var $accessconstraints;
@@ -622,9 +623,8 @@
 				}   
 				
 				if(mb_strtoupper($element[tag]) == "SRS"){
-	  				$this->objLayer[$cnt_layer]->wms_srs1 = $element[value];
 					// unique srs only, see http://www.mapbender.org/index.php/Arrays_with_unique_entries
-					$this->wms_srs = array_keys(array_flip(explode(" ", $this->objLayer[0]->wms_srs1)));  				
+					$this->wms_srs = array_keys(array_flip(array_merge($this->wms_srs, explode(" ", $element[value]))));  				
 				}						      
 				if(mb_strtoupper($element[tag]) == "LATLONBOUNDINGBOX"){
 					$cnt_epsg++;
@@ -815,7 +815,7 @@
 		echo "gui_wms_featureinfoformat: " . $this->gui_wms_featureinfoformat . " <br>";
 		echo "gui_wms_exceptionformat: " . $this->gui_wms_exceptionformat . " <br>";	
 		echo "gui_wms_epsg: " . $this->gui_wms_epsg . " <br>";
-		echo "wms_srs: " . $this->objLayer[0]->wms_srs1 . " <br>";		
+		echo "wms_srs: " . implode(", ", $this->wms_srs) . " <br>";		
 		echo "gui_wms_visible: " . $this->gui_wms_visible . " <br>";
 		echo "gui_wms_opacity: " . $this->gui_wms_opacity . " <br>";
 		echo "support_sld: " . $this->wms_supportsld . " <br>";
@@ -1032,6 +1032,13 @@
 					$this->objLayer[$i]->layer_epsg[$j]["maxx"] ."','". 
 					$this->objLayer[$i]->layer_epsg[$j]["maxy"] ."');";
 			}
+			for($j=0; $i==0 && $j<count($this->wms_srs);$j++){
+					if($parent){
+					$str .= "parent.";
+					}
+					$str .= "wms_addSRS('". 
+						$this->wms_srs[$j] ."', null, null, null, null);\n";
+			}
 			for($j=0; $j<count($this->objLayer[$i]->layer_style);$j++){
 				if($parent){
 				$str .= "parent.";
@@ -1845,6 +1852,16 @@
 				$count_wms++;
 			}
 	
+			### srs
+			$srs_sql = "SELECT * FROM wms_srs WHERE fkey_wms_id = $1 ";
+			$srs_v = array($wms_id);
+			$srs_t = array('i'); 
+			$srs_res = db_prep_query($srs_sql, $srs_v, $srs_t);
+			$this->wms_srs = array();
+			while($srs_row = db_fetch_array($srs_res)) {		
+				$this->wms_srs[]= $srs_row["wms_srs"];
+			}
+
 			### formats
 			$sql = "SELECT * FROM wms_format WHERE fkey_wms_id = $1 ";
 			$v = array($wms_id);



More information about the Mapbender_commits mailing list