Hi,
I am trying to turn off my basemaps according to the current zoom level....ie
for zoom levels over 6 show,enable and check "layer_0", otherwise show,enable
and check "layer_1"
<code>
map.events.on({
"zoomend": function (e) {
if (this.getZoom() >6) {
layerTree.getRootNode().findChild('layer', layer_0,
true).disable();
layer_0.setVisibility(false);
layerTree.getRootNode().findChild('layer', layer_0 , true).checked==false;
} else {
layerTree.getRootNode().findChild('layer', layer_1,
true).disable();
layer_1.setVisibility(true);
layerTree.getRootNode().findChild('layer', layer_1 ,
true).checked==true;
}
}
});
The problems are as follows...
1. The nodes do not "check"
2. The disable method works ok, but when I zoom out again the layer still
remains visible but does not zoom?!?
Has anyone done this successfully and can show me how?
yours,
Rob
_______________________________________________
Users mailing list
Users@geoext.org
http://www.geoext.org/cgi-bin/mailman/listinfo/users