Hello,<div>I am using Openlayers 2.8, Mapfish and Geoext and have a layertree. I may be asking on the wrong list but what is the best way to put different icons on the layertree. I use this approach now when creating the layer:</div>
<div><br></div><div><div>    var createWmsLayer = function(name, url, params, options) {</div><div>    var layer = new OpenLayers.Layer.WMS(name, url, params, options);</div><div>    map.addLayer(layer);         </div><div>
    return layer;</div><div>};</div></div><div><br></div><div>// Then the layer:</div><div><br></div><div><div>createWmsLayer(</div><div>                        "<span class='cr'>Kritisk truet</span>", "<a href="http://mydomain.com/geoserver/wms">http://mydomain.com/geoserver/wms</a>",</div>
<div>                {layers: 'gbif_ns:kritisk_truet',format: 'image/png', transparent: 'true'}, {singleTile: true, ratio: 1, isBaseLayer:false, visibility: true}</div><div>                        );</div>
</div><div>// The css</div><div><a href="http://span.cr">span.cr</a> {background: url(../images/CR.png) top left no-repeat;padding-left:20px !important}</div><div><br></div><div>So now I can use a background icon on this layer in the layertree. Problem is that the layername now is "<span class='cr'>Kritisk truet</span>" and not so easy to refer to later. I would like the layername to be only "Kritisk truet" but then i don't have any way to style it. Is there a better way so I can remove all the code around the name?</div>
<div><br></div><div>Thanks for any help!</div><div>~asle benoni</div><div><br></div><div><br></div>