[Users] deactivate tickbox next to layer in tree when zoomed out over certain zoom level
Andreas Hocevar
ahocevar at opengeo.org
Tue Nov 15 15:16:14 CET 2011
Hi,
try one of the patches from https://trac.geoext.org/ticket/235, or a snippet similar to this one: https://trac.geoext.org/ticket/285#comment:7
Andreas.
On Nov 15, 2011, at 13:35 , Robert Buckley wrote:
> 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
--
Andreas Hocevar
OpenGeo - http://opengeo.org/
Expert service straight from the developers.
More information about the Users
mailing list