<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>Hello folks,<br><pre>Thanks to Richard Greenwood, this function shows which layer is unselected in the layerswitcher control.<br><br>map.events.register('changelayer', null, function(evt){
       if(evt.property === "visibility") {
          alert(evt.layer.name + " layer visibility changed to " + evt.layer.visibility );
       }
});</pre>I'm wondering how I can save in a variable array the unselected layers. For instance I have layers "a", "b", "c" in the layerswitcher, so "a" is unselected and I want "b" and "c" saved in an array like myarray = [b,c]. Then, I can loop over this array to do some processes calling only layers "b" and "c".<br><br>I'll appreciate some ideas about this, thanks in advance,<br><br>Gery<br>                                           </div></body>
</html>