[Mapbender-commits] r6010 - trunk/mapbender/http/plugins

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Fri Apr 23 03:56:14 EDT 2010


Author: verenadiewald
Date: 2010-04-23 03:56:12 -0400 (Fri, 23 Apr 2010)
New Revision: 6010

Modified:
   trunk/mapbender/http/plugins/mb_handleStartUpWmsParams.php
Log:
check if layer is queryable

Modified: trunk/mapbender/http/plugins/mb_handleStartUpWmsParams.php
===================================================================
--- trunk/mapbender/http/plugins/mb_handleStartUpWmsParams.php	2010-04-22 15:02:13 UTC (rev 6009)
+++ trunk/mapbender/http/plugins/mb_handleStartUpWmsParams.php	2010-04-23 07:56:12 UTC (rev 6010)
@@ -74,6 +74,7 @@
 	var currentQueryLayerMatchTrue = false;
 	var mapObject = Mapbender.modules[options.target[0]];
 	var wmsArray = mapObject.wms;
+	
 	for (var i in wmsArray) {
 		var currentWms = wmsArray[i];
 	
@@ -94,7 +95,7 @@
 			for (var k in apiQueryLayerArray) {
 				var queryLayer = apiQueryLayerArray[k];
 				
-				if (queryLayer == currentLayer.layer_name) {
+				if (queryLayer == currentLayer.layer_name && currentLayer.gui_layer_queryable) {
 					currentLayer.gui_layer_querylayer = 1;
 					checkForQueryLayerArray.push(currentLayer.layer_name);
 				}
@@ -105,7 +106,7 @@
 				var pattern = new RegExp(apiVisibleLayersRegExpr);
 				var currentVisibleLayerMatch = currentLayer.layer_name.match(pattern);
 				
-				if (currentVisibleLayerMatch) {
+				if (currentVisibleLayerMatch && currentLayer.gui_layer_selectable) {
 					currentLayer.gui_layer_visible = 1;
 					currentVisibleLayerMatchTrue = true;
 				}
@@ -116,7 +117,7 @@
 				var pattern = new RegExp(apiQueryLayersRegExpr);
 				var currentQueryLayerMatch = currentLayer.layer_name.match(pattern);
 				
-				if (currentQueryLayerMatch) {
+				if (currentQueryLayerMatch && currentLayer.gui_layer_queryable) {
 					currentLayer.gui_layer_querylayer = 1;
 					currentQueryLayerMatchTrue = true;
 				}
@@ -132,7 +133,7 @@
 			var visibleLayerString = visibleLayerNotFound.join(",");
 			var visibleLayerNotFoundMsg = "Visible layer " + visibleLayerString + " not found."; 
 			new Mapbender.Notice(visibleLayerNotFoundMsg);
-			alert(visibleLayerNotFoundMsg);
+			//alert(visibleLayerNotFoundMsg);
 		}
 	}
 	
@@ -142,7 +143,7 @@
 			var queryLayerString = queryLayerNotFound.join(",");
 			var queryLayerNotFoundMsg = "Query layer " + queryLayerString + " not found."; 
 			new Mapbender.Notice(queryLayerNotFoundMsg);
-			alert(queryLayerNotFoundMsg);
+			//alert(queryLayerNotFoundMsg);
 		}
 	}
 	
@@ -150,7 +151,7 @@
 		if(currentVisibleLayerMatchTrue === false) { 
 			var visibleLayerNotFoundMsg = "No visible layer matches the given regular expression."; 
 			new Mapbender.Notice(visibleLayerNotFoundMsg);
-			alert(visibleLayerNotFoundMsg);
+			//alert(visibleLayerNotFoundMsg);
 		}
 	}
 	
@@ -158,7 +159,7 @@
 		if(currentQueryLayerMatchTrue === false) {
 			var queryLayerNotFoundMsg = "No queryable layer matches the given regular expression."; 
 			new Mapbender.Notice(queryLayerNotFoundMsg);
-			alert(queryLayerNotFoundMsg);
+			//alert(queryLayerNotFoundMsg);
 		}
 	}
 	



More information about the Mapbender_commits mailing list