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

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Tue Sep 21 11:14:13 EDT 2010


Author: christoph
Date: 2010-09-21 15:14:13 +0000 (Tue, 21 Sep 2010)
New Revision: 6923

Modified:
   trunk/mapbender/http/javascripts/initWmcObj.php
Log:
http://trac.osgeo.org/mapbender/ticket/667

http://www.mapbender.org/index.php?title=GET-Parameter&oldid=16933

Modified: trunk/mapbender/http/javascripts/initWmcObj.php
===================================================================
--- trunk/mapbender/http/javascripts/initWmcObj.php	2010-09-21 14:05:26 UTC (rev 6922)
+++ trunk/mapbender/http/javascripts/initWmcObj.php	2010-09-21 15:14:13 UTC (rev 6923)
@@ -83,14 +83,11 @@
 			}
 			array_push($wmsArray, $currentWms);
 			
-			if($multipleAssocArray['visible']) {
-				$options['visible'] = $multipleAssocArray['visible'] === 1 ?
-					true : false;
-			}
-			if($multipleAssocArray['zoom']) {
-				$options['zoom'] = $multipleAssocArray['zoom'] === 1 ?
-					true : false;
-			}
+			$options['visible'] = $multipleAssocArray['visible'] === "1" ?
+				true : false;
+
+			$options['zoom'] = $multipleAssocArray['zoom'] === "1" ?
+				true : false;
 			
 			$wmc->mergeWmsArray($wmsArray, $options);
 			$wmsArray = array();
@@ -126,15 +123,11 @@
 			$singleAssocArray['id']
 		);
 		array_push($wmsArray, $currentWms);
-		if($singleAssocArray['visible']) {
-			$options['visible'] = $singleAssocArray['visible'] === 1 ?
-				true : false;
-		}
+		$options['visible'] = $singleAssocArray['visible'] === "1" ?
+			true : false;
 		
-		if($singleAssocArray['zoom'] && $singleAssocArray['zoom'] != "") {
-			$options['zoom'] = $singleAssocArray['zoom'] === 1 ?
-				true : false;
-		}
+		$options['zoom'] = $singleAssocArray['zoom'] === "1" ? true : false;
+
 		$wmc->mergeWmsArray($wmsArray, $options);
 		$wmsArray = array();
 		$singleAssocArray = array();
@@ -145,11 +138,11 @@
 		$currentWms->createObjFromXML($singleAssocArray['url']);
 		array_push($wmsArray, $currentWms);
 		if($singleAssocArray['visible']) {
-			$options['visible'] = $singleAssocArray['visible'] === 1 ?
+			$options['visible'] = $singleAssocArray['visible'] === "1" ?
 				true : false;
 		}
 		if($singleAssocArray['zoom']) {
-			$options['zoom'] = $singleAssocArray['zoom'] === 1 ?
+			$options['zoom'] = $singleAssocArray['zoom'] === "1" ?
 				true : false;
 		}
 		$wmc->mergeWmsArray($wmsArray, $options);



More information about the Mapbender_commits mailing list