Hi Dmitri, <br>
<br>
For right now the best solution I can think of is to listen for the
"changebaselayer" event on the map. When the user clicks a different
baselayer, this gets fired. <br>
<br>
Erik<br>
<br>
<br><div><span class="gmail_quote">On 4/18/07, <b class="gmail_sendername">Dmitri Mizerkin</b> <<a href="mailto:eisberg@gmail.com">eisberg@gmail.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hello List,<br><br>I am using layer pairs in my map, one of those for
selection. I would like to remove the selection layer from the map as
soon as the user removes the main layer using the layer switcher. Is it
possible to register some "visibilityChanged" event handler, so that it
calls a function as soon as its visibility parameter changes?
<br>It could be something like that:<br><br>layer.events.register("visibilityChanged", layer, function(e) {} );<br><br>Maybe
there is some way to register the event in the layer switcher control
as well, which could call the function as soon as it has changes?
<br clear="all"><br>Thanks in advance!<br><span class="sg">Dmitri
</span><br>_______________________________________________<br>Users mailing list<br><a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:Users@openlayers.org">Users@openlayers.org</a><br><a onclick="return top.js.OpenExtLink(window,event,this)" href="http://openlayers.org/mailman/listinfo/users" target="_blank">
http://openlayers.org/mailman/listinfo/users</a><br><br></blockquote></div><br>