[OpenLayers-Users] How to create legends for WMS Layers

Rahn Hanno (rahn) rahn at zhaw.ch
Wed Jul 21 00:59:30 EDT 2010


Hello list,

I try to show a legend for my base WMS layer. But I don't know how to realsie it. Is there a possibility in OpenLayers to show a legend in a div?
I want to have a legend like this:

0 - 0.5
>0.5 - 1
>1 - 2
>2 - 3
>3 - 4

I know the GetLegendGraphic Parameter for WMS, but if I use this my legend always looks like this:

0 - 0.5
0.5 - 1
1 - 2
2 - 3
3 - 4

But with this you don't know which is the class for 0.5. Is there a dynamic way to create the legend, My data is in an postgres database and I use UMN Mapserver for the WMS.

Thank you
Hanno

------------------------------------------
Hanno Rahn, Dipl.-Ing. (FH) Geoinformatik
ZHAW Zürcher Hochschule für Angewandte Wissenschaften Umwelt und Natürliche Ressourcen 
Fachstelle Geoinformatik 
Grüental, Postfach CH-8820 Wädenswil 
Tel +41 (0)58 934 5592
Fax +41 (0)58 934 5580 
hanno.rahn at zhaw.ch
www.iunr.zhaw.ch/geoinformatik

 
 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100721/49ec87d2/attachment.html


More information about the Users mailing list