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

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Mon Oct 4 06:21:20 EDT 2010


Author: verenadiewald
Date: 2010-10-04 10:21:20 +0000 (Mon, 04 Oct 2010)
New Revision: 7016

Modified:
   trunk/mapbender/http/html/mod_treefolderPlain.php
Log:
new configurable menu option for static html legend

Modified: trunk/mapbender/http/html/mod_treefolderPlain.php
===================================================================
--- trunk/mapbender/http/html/mod_treefolderPlain.php	2010-10-04 10:19:50 UTC (rev 7015)
+++ trunk/mapbender/http/html/mod_treefolderPlain.php	2010-10-04 10:21:20 UTC (rev 7016)
@@ -211,6 +211,7 @@
 var menu_zoom = ['menu_zoom', ['<?php echo _mb("Zoom");?>&nbsp;', 'javascript:var sd = "{@strData}";var ids=eval(sd.substr(0, sd.length-6))[1][7];zoomToLayer(ids[0],ids[1],ids[2]);',,'zoom.png']];
 var menu_hide = ['menu_hide', ['<?php echo _mb("Hide menu");?>&nbsp;', 'javascript:hideMenu()',,'hide.png']];
 var menu_style = ['menu_style', ['<?php echo _mb("Change style");?>&nbsp;', 'javascript:var sd = "{@strData}";var ids=eval(sd.substr(0, sd.length-6))[1][7];openStyleDialog(ids[0],ids[1],ids[2])',,'palette.png']];
+var menu_legend = ['menu_legend', ['<?php echo _mb("Legende öffnen");?>&nbsp;', 'javascript:var sd = "{@strData}";var ids=eval(sd.substr(0, sd.length-6))[1][7];openLegendHtml(ids[0],ids[1],ids[2])',,'legend_tree.png']];
 //var menu_wms_switch = ['menu_zoom', ['<?php echo _mb("Zoom");?>&nbsp;', 'javascript:var sd = "{@strData}";eval(eval(sd.substr(0, sd.length-6))[1][1]);openwindow(defaultMetadataUrl + "&id="+parent.mb_mapObj[selectedMap].wms[selectedWMS].objLayer[selectedLayer].layer_uid);',,'info.png']];
 //var menu_layer_switch = ['menu_zoom', ['Zjjj&nbsp;', 'javascript:var sd = "{@strData}";eval(eval(sd.substr(0, sd.length-6))[1][1]);openwindow(defaultMetadataUrl + "&id="+parent.mb_mapObj[selectedMap].wms[selectedWMS].objLayer[selectedLayer].layer_uid);',,'info.png']];
 //var menu_info_switch = ['menu_zoom', ['Zmn&nbsp;', 'javascript:var sd = "{@strData}";eval(eval(sd.substr(0, sd.length-6))[1][1]);openwindow(defaultMetadataUrl + "&id="+parent.mb_mapObj[selectedMap].wms[selectedWMS].objLayer[selectedLayer].layer_uid);',,'info.png']];
@@ -477,6 +478,17 @@
 	}
 }
 
+function openLegendHtml(j,k,l){
+	if(!j && !k&& !l){
+		j=selectedMap;
+		k=selectedWMS;
+		l=selectedLayer;
+	}
+	var my= mb_mapObj[j].wms[k].objLayer[l];
+	var legendWindow = window.open("../metadata/"+my.layer_name+".html", "Legende", "width=800,height=800,left=100,top=100,scrollbars=yes,resizable=no");
+	legendWindow.focus();
+}
+
 function openStyleDialog(j,k,l){
 	if(!j && !k&& !l){
 		j=selectedMap;
@@ -768,7 +780,8 @@
 //									if(menu.indexOf("layer_switch")!=-1)c_menu+="menu_layer_switch,";
 //									if(menu.indexOf("info_switch")!=-1)c_menu+="menu_info_switch,";
 									if(menu.indexOf("hide")!=-1)c_menu+="menu_hide,";
-									if(menu.indexOf("change_style")!=-1)c_menu+="menu_style";
+									if(menu.indexOf("change_style")!=-1)c_menu+="menu_style,";
+									if(menu.indexOf("legend")!=-1)c_menu+="menu_legend";
 									c_menu+="]";
 									
 									controls = [];



More information about the Mapbender_commits mailing list