dmitri, since they are all overlays, <br>
I think you must work with the <br>
<br>
updateMap() function in layerswitcher. <br>
<br>
You can try something like this: <br>
<br>
OpenLayers.Control.LayerSwitcher.prototype._updateMap = <br>
OpenLayers.Control.LayerSwitcher.prototype.updateMap;<br>
OpenLayers.Control.LayerSwitcher.prototype.updateMap = <br>
function() {<br>
this._updateMap();<br>
<br>
//make your test, do your action<br>
};<br>
<br>
<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;">
I'm afraid the "changebaselayer" event won't help me out, because all the selectable layers I use are overlays.<br>So
there's no way to do it, is there? Well, I'll look for a workaround,
but it would be great if this feature was in the newest release.
<br><br>Thanks anyway!<br><br>Cheers,<br><span class="sg">Dmitri</span><div><span class="e" id="q_112055a60d9dac07_2"><br><br><div><span class="gmail_quote">On 4/18/07, <b class="gmail_sendername">Schuyler Erle</b> <<a href="mailto:sderle@metacarta.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
sderle@metacarta.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;">Dmitri, I think we would accept a patch for 2.5 if you or anyone else<br>wanted to submit one for this.
<br><br>SDE<br><br>On Wed, 2007-04-18 at 10:22 -0500, Erik Uzureau wrote:<br>> Hi Dmitri,<br>><br>> For right now the best solution I can think of is to listen for the<br>> "changebaselayer" event on the map. When the user clicks a different
<br>> baselayer, this gets fired.<br>><br>> Erik<br>><br>><br>> On 4/18/07, Dmitri Mizerkin <<a href="mailto:eisberg@gmail.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
eisberg@gmail.com</a>> wrote:<br>> Hello List,<br>><br>
> I am using layer pairs in my map, one of those for selection.<br>> I would like to remove the selection layer from the map as<br>> soon as the user removes the main layer using the layer
<br>> switcher. Is it possible to register some "visibilityChanged"<br>> event handler, so that it calls a function as soon as its<br>> visibility parameter changes?<br>> It could be something like that:
<br>><br>> layer.events.register("visibilityChanged", layer, function(e)<br>> {} );<br>><br>> Maybe there is some way to register the event in the layer<br>> switcher control as well, which could call the function as
<br>> soon as it has changes?<br>><br>> Thanks in advance!<br>> Dmitri<br>> _______________________________________________<br>> Users mailing list<br>>
<a href="mailto:Users@openlayers.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">Users@openlayers.org</a><br>> <a href="http://openlayers.org/mailman/listinfo/users" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
http://openlayers.org/mailman/listinfo/users</a><br>><br>><br>> _______________________________________________
<br>> Users mailing list<br>> <a href="mailto:Users@openlayers.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">Users@openlayers.org</a><br>> <a href="http://openlayers.org/mailman/listinfo/users" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
http://openlayers.org/mailman/listinfo/users</a><br><br></blockquote>
</div>
</span></div><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>