<div dir="ltr">This can be done by creating a new LayerSwitcher control which supports grouping of layers.  This isn't too hard to do, if you have sufficient JS and HTML coding abilty.<div><br></div><div>There's an open pull request for a new LayerSwitcherGroups control that apparently does this:<div><br></div><div><a href="https://github.com/openlayers/openlayers/pull/12/">https://github.com/openlayers/openlayers/pull/12/</a><br></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Sep 17, 2014 at 10:51 PM, Andreas Forø Tollefsen <span dir="ltr"><<a href="mailto:andreasft@gmail.com" target="_blank">andreasft@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><span style="font-family:arial,sans-serif;font-size:12.7272720336914px">Hi,</span><div style="font-family:arial,sans-serif;font-size:12.7272720336914px"><br></div><div style="font-family:arial,sans-serif;font-size:12.7272720336914px">I am working on a thematic mapping platform showing data at local administrative levels.</div><div style="font-family:arial,sans-serif;font-size:12.7272720336914px">I have many layers, so I run into problems (see screenshot: <a href="http://gisintersect.com/many_layers.png" target="_blank">http://gisintersect.com/many_layers.png</a>).</div><div style="font-family:arial,sans-serif;font-size:12.7272720336914px"><br></div><div style="font-family:arial,sans-serif;font-size:12.7272720336914px">Is there any way I can collapse groups of layers within the layer switcher?</div><div style="font-family:arial,sans-serif;font-size:12.7272720336914px">I have a high number of layers, as you can see in the switcher. Hence, I need some way to collapse/group/categorize the layers, so that I do not need to show all of them in the layerswitcher at once.</div><div style="font-family:arial,sans-serif;font-size:12.7272720336914px">The result is that layers drop outside the map, so either, there is a maximum number of layers, or there should be a better way to do it.</div><span class="HOEnZb"><font color="#888888"><div style="font-family:arial,sans-serif;font-size:12.7272720336914px"><br></div><div style="font-family:arial,sans-serif;font-size:12.7272720336914px">Andreas</div></font></span></div>
<br>_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.osgeo.org">Users@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/openlayers-users" target="_blank">http://lists.osgeo.org/mailman/listinfo/openlayers-users</a><br></blockquote></div><br></div>