unfortunately not,

I didnĀ“t get time to go into it. Any code to give away?

cheers,

Rob



________________________________
Von: brad <b...@numaps.com.au>
An: Robert Buckley <robertdbuck...@yahoo.com>
Gesendet: Montag, den 1. August 2011, 23:12:08 Uhr
Betreff: RE: [Users] Disable treenode according to scale


Robert did you get this resolved. I have done it the way that i suggested so 
just wondered if you did too?
 
Brad...
 
From:users-boun...@geoext.org [mailto:users-boun...@geoext.org] On Behalf Of 
Robert Buckley
Sent: Monday, 25 July 2011 10:30 PM
To: users@geoext.org
Subject: [Users] Disable treenode according to scale
 
Hi,

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.

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

Does anyone know how I could disable the node?


thanks,


Rob



// TREE
var layerList = new Ext.tree.TreeNode({
            text: "Kartenebene",
            
            expanded: true
            });
    layerRoot.appendChild(new GeoExt.tree.BaseLayerContainer({
            text: "Hintergrundkarten",
            map: map,
            expanded: true
            }));
    layerRoot.appendChild(new GeoExt.tree.OverlayLayerContainer({
            text: "Themen",
            map: map,
            expanded: true
            }));
    var layerTree = new Ext.tree.TreePanel({
        title: "Karteninhalte",
        region: "center",
        root: layerRoot,
        enableDD: true,
        collapsible: true,
        height: 200,
        expanded: true
    });        



// Scale dependant layer
map.events.on({ "zoomend": function (e) {
      if (this.getZoom() > 9) {
    
      layer_wea_wms.setVisibility(true);
                  
      }
      else {
      layer_wea_wms.setVisibility(false);
      }
           }//end function (e)
    }); //end map.events.on 
_______________________________________________
Users mailing list
Users@geoext.org
http://www.geoext.org/cgi-bin/mailman/listinfo/users

Reply via email to