There are a few posts on not beeing able to group layers in the layer
switcher.

If you are only talking about a grouping by layout (no simultaneous opening
or collapsing) it can be done very simple by use of HTML in the layer
descriptions and in the used language script.

In the example below I have modified line 17 and 19 in the language script
(en.js when in English, da-DK.js when it like mine is in Danish):

    'overlays': "<hr><br>Kortlag:<br><hr>",

    'baseLayer': "Grundkort:<br><hr>",

<br> ads a line break as you probably know and <hr> adds a horisontal line.

In my openlayers html file I have further more enhanced the layer
descriptions with similar HTML tags:

var vejm = new OpenLayers.Layer.GML("Kortlagt
vejstrækning<hr>","xml/vejmidte.xml",
{styleMap: vejm_style,visibility:true,maxScale:30000});
map.addLayer(vejm)      

You can also use underlining of the text if you like using the <u> and </u>
tags. 
Specifying bold text has no effect - I suppose this is controlled by some
css file?

http://osgeo-org.1803224.n2.nabble.com/file/n5834191/Layer_Switcher_layout.png 
-- 
View this message in context: 
http://osgeo-org.1803224.n2.nabble.com/Very-simple-graphic-grouping-of-layers-in-Layer-Switcher-tp5834191p5834191.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
_______________________________________________
Users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-users

Reply via email to