I download TOC here:
I want to create a button like the sample one able to turn on/off a layer.
I only able to turn on a sublayer using setVisibleLayers method here when a button is clicked.
But how do you turn off the same sublayer when another button is clicked? I don't want to use toc.findTOCNode( Dynlayer, 11).hide(). It will remove the layer. I would to uncheck the layer instead of remove the layer.
Is there any way, simple way to do this task?