[Commits] r1880 - core/trunk/geoext/examples
commits at geoext.org
commits at geoext.org
Thu Feb 11 08:31:23 CET 2010
Author: ahocevar
Date: 2010-02-11 08:31:23 +0100 (Thu, 11 Feb 2010)
New Revision: 1880
Modified:
core/trunk/geoext/examples/legendpanel.js
Log:
use a different layer for toggleVis, so we still see the effect after show/hide. Non-functional change.
Modified: core/trunk/geoext/examples/legendpanel.js
===================================================================
--- core/trunk/geoext/examples/legendpanel.js 2010-02-09 16:41:40 UTC (rev 1879)
+++ core/trunk/geoext/examples/legendpanel.js 2010-02-11 07:31:23 UTC (rev 1880)
@@ -54,7 +54,7 @@
};
var toggleVisibility = function() {
- var layer = layerRec0.get("layer");
+ var layer = layerRec1.get("layer");
layer.setVisibility(!layer.getVisibility());
};
@@ -81,6 +81,9 @@
// UrlLegend instead of WMSLegend to be used
var layerRec0 = mapPanel.layers.getAt(0);
layerRec0.set("legendURL", "http://demo.opengeo.org/geoserver/wms?FORMAT=image%2Fgif&TRANSPARENT=true&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetLegendGraphic&EXCEPTIONS=application%2Fvnd.ogc.se_xml&LAYER=topp%3Atasmania_state_boundaries");
+
+ // store the layer that we will modify in toggleVis()
+ var layerRec1 = mapPanel.layers.getAt(1);
// stores another legendURL for the legendurl button action
var otherUrl = "http://www.geoext.org/trac/geoext/chrome/site/img/GeoExt.png";
More information about the Commits
mailing list