<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:arial, helvetica, sans-serif;font-size:10pt"><div>unfortunately not,</div><div><br></div><div>I didnīt get time to go into it. Any code to give away?</div><div><br></div><div>cheers,</div><div><br></div><div>Rob</div><div style="font-family:arial, helvetica, sans-serif;font-size:10pt"><br><div style="font-family:times new roman, new york, times, serif;font-size:12pt"><font size="2" face="Tahoma"><hr size="1"><b><span style="font-weight: bold;">Von:</span></b> brad <brad@numaps.com.au><br><b><span style="font-weight: bold;">An:</span></b> Robert Buckley <robertdbuckley@yahoo.com><br><b><span style="font-weight: bold;">Gesendet:</span></b> Montag, den 1. August 2011, 23:12:08 Uhr<br><b><span style="font-weight: bold;">Betreff:</span></b> RE: [Users] Disable treenode according to scale<br></font><br><style><!--
_filtered {font-family:"Cambria Math";panose-1:2 4 5 3 5 4 6 3 2 4;}
_filtered {font-family:Calibri;panose-1:2 15 5 2 2 2 4 3 2 4;}
_filtered {font-family:Tahoma;panose-1:2 11 6 4 3 5 4 4 2 4;}
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;margin-bottom:.0001pt;font-size:12.0pt;font-family:"serif";}
a:link, span.MsoHyperlink
        {color:blue;text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;text-decoration:underline;}
span.EmailStyle17
        {font-family:"sans-serif";color:#1F497D;}
.MsoChpDefault
        {font-size:10.0pt;}
_filtered {margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {}
--></style><div class="WordSection1"><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"sans-serif";color:#1F497D;">Robert did you get this resolved. I have done it the way that i suggested so just wondered if you did too?</span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"sans-serif";color:#1F497D;"> </span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"sans-serif";color:#1F497D;">Brad...</span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"sans-serif";color:#1F497D;"> </span></p><div><div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm;"><p class="MsoNormal"><b><span lang="EN-US" style="font-size:10.0pt;font-family:"sans-serif";">From:</span></b><span lang="EN-US" style="font-size:10.0pt;font-family:"sans-serif";"> users-bounces@geoext.org [mailto:users-bounces@geoext.org]
<b>On Behalf Of </b>Robert Buckley<br><b>Sent:</b> Monday, 25 July 2011 10:30 PM<br><b>To:</b> users@geoext.org<br><b>Subject:</b> [Users] Disable treenode according to scale</span></p></div></div><p class="MsoNormal"> </p><div><p class="MsoNormal"><span style="font-size:10.0pt;font-family:"sans-serif";color:black;">Hi,<br><br>this code turns off the layer "layer_wea_wms" when I zoom out by more than zoomlevel 8. What I would actually like to do is complete disable the treenode as well so that it is impossible to make it visible.<br><br>I have tried to get a reference to the treenodes by name, but I cannot return the object. The treenodes are loaded automatically using the code below<br><br>Does anyone know how I could disable the node?<br><br><br>thanks,<br><br><br>Rob<br><br><br><br>// TREE<br>var layerList = new Ext.tree.TreeNode({<br> text:
"Kartenebene",<br> <br> expanded: true<br> });<br> layerRoot.appendChild(new GeoExt.tree.BaseLayerContainer({<br> text: "Hintergrundkarten",<br> map: map,<br> expanded: true<br> }));<br> layerRoot.appendChild(new GeoExt.tree.OverlayLayerContainer({<br> text: "Themen",<br> map: map,<br> expanded: true<br>
}));<br> var layerTree = new Ext.tree.TreePanel({<br> title: "Karteninhalte",<br> region: "center",<br> root: layerRoot,<br> enableDD: true,<br> collapsible: true,<br> height: 200,<br> expanded: true<br> }); <br><br><br><br>// Scale dependant layer<br>map.events.on({ "zoomend": function (e) {<br> if (this.getZoom() > 9) {<br> <br> layer_wea_wms.setVisibility(true);<br> <br> }<br> else
{<br> layer_wea_wms.setVisibility(false);<br> }<br> }//end function (e)<br> }); //end map.events.on </span></p><div><p class="MsoNormal"><span style="font-size:10.0pt;font-family:"sans-serif";color:black;"> </span></p></div></div></div></div></div><div style="position:fixed"></div>
</div></body></html>