[OpenLayers-Users] Determine if LayerSwitcher is open or closed

Casper Span info at spatially-oriented.com
Mon Nov 14 07:12:26 EST 2011


Hi Dekek,

As far as I know, there is no property or field. When the switcher opens or
closes, the CSS display of the switcher will be modified directly.
As such, I think you can only check the css display state to see if it's
currently open.

I'd probably use jQuery to find the layerswitcher and ask its display
state. You could, for example check for the OpenLayers_Control_MaximizeDiv
css id.

if it's visible, the layerswitcher should be hidden.

On Fri, Nov 11, 2011 at 12:07 PM, Derek Watling <derek at cmainfo.co.za> wrote:

> How can I programmatically determine if the LayerSwitcher is currently open
> or closed?
>
> --
> View this message in context:
> http://osgeo-org.1803224.n2.nabble.com/Determine-if-LayerSwitcher-is-open-or-closed-tp6985047p6985047.html
> Sent from the OpenLayers Users mailing list archive at Nabble.com.
> _______________________________________________
> Users mailing list
> Users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/openlayers-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20111114/8a3482e8/attachment.html


More information about the Users mailing list