Hi Imran,<br><br>if you want to extent the layer switcher with custom functionality, the cleanest way is to derive your own CustomLayerSwitcher class from Control.LayerSwitcher.<br><br>You just need to redefine the redraw() method, where all the HTML of the Control is assembled.<br>
<br>OpenLayers.Control.MyCustomLayerSwitcher = OpenLayers.Class(OpenLayers.Control.LayerSwitcher,{<br> redraw: function (){<br> //copy this method from lib/openlayers/control/layerswitcher.js and change it to your needs<br>
<br> },<br> CLASSNAME: "OpenLayers.Control.MyCustomLayerSwitcher"<br>});<br><br>you would then use your layerswitcher like so:<br><br>mylayerswitcher = new OpenLayers.Control.MyCustomLayerSwitcher();<br>mymap.addControl(mylayerswitcher);<br>
<br>kind regards,<br><br>Franz<br><br><br><div class="gmail_quote">2010/8/4 Imran Rajjad <span dir="ltr"><<a href="mailto:rajjad@gmail.com">rajjad@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Hi list,<br>
<br>
is it possible to add checkbox and text to the layer switcher which<br>
have custom functionality , I have a set of checkboxes that when<br>
interacted with apply filters to a wms layer..i want these check boxes<br>
to appear beneath that layer instead of somewhere outside, so i was<br>
wondering , if ther;s a way to add these checkboxes and there text to<br>
layer switcher..is it possible to get that div by classname and append<br>
custom controls in it?<br>
<br>
regards,<br>
Imran<br>
<font color="#888888"><br>
--<br>
I.R<br>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@openlayers.org">Users@openlayers.org</a><br>
<a href="http://openlayers.org/mailman/listinfo/users" target="_blank">http://openlayers.org/mailman/listinfo/users</a><br>
</font></blockquote></div><br>