[Mapbender-commits] r6791 - trunk/mapbender/http/html

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Mon Aug 23 08:31:39 EDT 2010


Author: verenadiewald
Date: 2010-08-23 12:31:39 +0000 (Mon, 23 Aug 2010)
New Revision: 6791

Modified:
   trunk/mapbender/http/html/mod_treefolderPlain.php
Log:
if currentLayer.gui_layer_title is an empty string, take the currentWms.wms_title as layer title

Modified: trunk/mapbender/http/html/mod_treefolderPlain.php
===================================================================
--- trunk/mapbender/http/html/mod_treefolderPlain.php	2010-08-23 11:57:08 UTC (rev 6790)
+++ trunk/mapbender/http/html/mod_treefolderPlain.php	2010-08-23 12:31:39 UTC (rev 6791)
@@ -49,6 +49,7 @@
 	}
 	for(var i = 0; i < map.wms.length; i++) {
 		var currentWms = map.wms[i];
+		
 		treefolderTitleArray.push({
 			title : currentWms.objLayer.length > 0 ?
 				currentWms.objLayer[0].gui_layer_title : 
@@ -59,7 +60,9 @@
 		for (var j = 0; j < currentWms.objLayer.length; j++) {
 			var currentLayer = currentWms.objLayer[j];
 			treefolderTitleArray[treefolderTitleArray.length-1].layer.push({
-				title : currentLayer.gui_layer_title
+				title : currentLayer.gui_layer_title != "" ?
+				currentLayer.gui_layer_title : 
+				currentWms.wms_title
 			});
 		}
 	}



More information about the Mapbender_commits mailing list