[Users] deactivate tickbox next to layer in tree when zoomed out over certain zoom level
Christian Mayer
mayer at terrestris.de
Tue Nov 15 15:10:28 CET 2011
Hi Rob,
try to use
node.disable();
where node could for example be determined via getNodeById( String id )
[1] on your tree panel.
Best regards,
Chris
[1]
http://docs.sencha.com/ext-js/3-4/#!/api/Ext.tree.TreePanel-method-getNodeById
<http://docs.sencha.com/ext-js/3-4/#%21/api/Ext.tree.TreePanel-method-getNodeById>
Am 15.11.2011 13:35, schrieb Robert Buckley:
> Hi,
>
> I would like to disable the tickbox next to a layer when the user
> zooms out greater than zoom level 12. This will tell the user that the
> layer is deactivated.
> At the moment I have the following code which simple sets the
> visibility , but when the zoom level is 11, the tick box is still
> white and can still be ticked on and off.
>
>
> here is my code to set the visibility of the layer
>
> map.events.on({ "zoomend": function (e) {
> if (this.getZoom() > 12) {
> layer_Flurbloeke.setVisibility(true);
> layer_Flurbloeke.icon='../images/add.png';
> layer_ertrag.setVisibility(true);
> }
> else {
> layer_Flurbloeke.setVisibility(false);
> layer_ertrag.setVisibility(false);
> }
> }//end function (e)
> }); //end map.events.on
>
>
> Thanks for any help,
>
> Rob
>
>
>
> _______________________________________________
> Users mailing list
> Users at geoext.org
> http://www.geoext.org/cgi-bin/mailman/listinfo/users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.geoext.org/pipermail/users/attachments/20111115/f0f7e8b4/attachment.htm
More information about the Users
mailing list