Hi List,
If you want to click something else than the Control to toggle the
layerswitcher you need an extra function to check the state of the Control
by looking at the minimizedDiv or maximizedDiv propery. I never worried
about the logic of the terms.
If the maximizeDiv display =="none" the switchercontrol is in the maximized
state so it seems
so:
OpenLayers.Control.LayerSwitcher.prototype.isShowControls = function ()
{
return(this.maximizeDiv.style.display=="none") ;
}
usage:
if(layerSwitcher.isShowControls())
layerSwitcher.minimizeControl()
else
layerSwitcher.maximizeControl();
this is compatible with the layer switcher control button (class:
olControlLayerSwitcher)
regards, Huub
_______________________________________________
Users mailing list
[email protected]
http://openlayers.org/mailman/listinfo/users