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

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Fri Apr 3 04:58:48 EDT 2009


Author: christoph
Date: 2009-04-03 04:58:47 -0400 (Fri, 03 Apr 2009)
New Revision: 3849

Modified:
   trunk/mapbender/http/javascripts/wms.js
Log:
abort if layer is not found

Modified: trunk/mapbender/http/javascripts/wms.js
===================================================================
--- trunk/mapbender/http/javascripts/wms.js	2009-04-03 06:10:52 UTC (rev 3848)
+++ trunk/mapbender/http/javascripts/wms.js	2009-04-03 08:58:47 UTC (rev 3849)
@@ -479,11 +479,17 @@
  */
 wms_const.prototype.handleLayer = function(layer_name, type, value){
 	var i;
+	var found = false;
 	for(i = 0; i < this.objLayer.length; i++){
 		if(this.objLayer[i].layer_name==layer_name) {
+			found = true;
 			break;
 		}
 	}
+	// layer not found
+	if (!found) {
+		return;
+	}
 	
 	//Set visibility/queryability of Layer and Sublayers
 	for(var j = i; j < this.objLayer.length; j++){



More information about the Mapbender_commits mailing list