Hi David, AFAIK you cannot embed a legend within the LayerSwitcher using OpenLayers without changing the LayerSwitcherControl itself. There is no API-method/variable to add legend images to the LayerSwitcher. Of course you can have a look at the source of the URL you provided:
In the file http://www.microimages.com/ogc/newtntmap/openlayers/lib/OpenLayers.js from line 12374 the changed LayerSwitcher-Control is defined. Looks as if they are reading a 'legendImg'-Property of a layer and add an <img>-Tag to the LayerSwitcher if that is set (line 12522). Hope that helps. Regards, Marc David Alda Fernandez de Lezea wrote: > Hello, > > I would like to know how can I have the legend of my wms layers in the layer > switcher. Just to show my idea I found an example: > http://www.microimages.com/ogc/maps/nebraskaopen.htm . > > Thanks. > > > Un saludo, > > ·················································································· > > David Alda Fernández de Lezea > Lurralde eta Biodibertsitate Saila / Dpto. de Territorio y Biodiversidad > > IKT > Granja Modelo s/n · 01192 · Arkaute (Araba) > > ·················································································· > Tlfnos.: 945-00-32-95 Fax: 945-00.32.90 > ·················································································· > email: da...@ikt.es web: www.ikt.es > ·················································································· > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > -- Dipl.-Geogr. Marc Jansen - Anwendungsentwickler - terrestris GmbH & Co. KG Irmintrudisstraße 17 53111 Bonn Tel: ++49 (0)228 / 96 28 99 -53 Fax: ++49 (0)228 / 96 28 99 -57 Email: jan...@terrestris.de Web: http://www.terrestris.de Amtsgericht Bonn, HRA 6835 Komplementärin: terrestris Verwaltungsgesellschaft mbH vertreten durch: Hinrich Paulsen, Till Adams _______________________________________________ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users