<html><head><style type='text/css'>p { margin: 0; }</style></head><body><div style='font-family: Times New Roman; font-size: 10Impr; color: #000000'>thanks for your help but the legend is not displayed...<br>i get the following error message :<br>msEvalRegex(): Regular expression error<br>Do you have any idea why ?<br><br>----- Mail Original -----<br>De: "Andrew de Klerk" <andrew.deklerk@gmail.com><br>À: "Sophie GRAS" <sophie.gras@espaces-naturels.fr>, "users@openlayers" <users@openlayers.org><br>Envoyé: Mercredi 15 Octobre 2008 17:09:31 GMT +01:00 Amsterdam / Berlin / Berne / Rome / Stockholm / Vienne<br>Objet: RE: [OpenLayers-Users] Display legend<br><br>A bit long winded, but we use the “GetLegendGraphic” Request to request the graphic for each class and then place them in a div outside of the map (div could be placed on top of map as well). The "LAYER" is your class name for that particular layer. I cannot recall why we never used GetLegend - there must have been a reason..............but..... this works for us ☺.<br><br><div id="legend" style="text-align:left; display:none; position:absolute; z-index:777;cursor:pointer; border:1px solid #a9a9a9; background-color:White;"><br> <img src="http://localhost/wms/streetmap.asp?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetLegendGraphic&LAYER=Provinces&Format=image/png" alt="" style="border:none;"/><br /><br> <img src="http:// localhost /wms/streetmap.asp?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetLegendGraphic&LAYER=Capital_Towns&Format=image/png" alt="" style="border:none;"/><br /><br> <img src="http:// localhost wms/streetmap.asp?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetLegendGraphic&LAYER=Major_Towns&Format=image/png" alt="" style="border:none;"/><br /><br> <img src="http:// localhost /wms/streetmap.asp?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetLegendGraphic&LAYER=Secondary_Towns&Format=image/png" alt="" style="border:none;"/><br /><br> <img src="http:// localhost wms/streetmap.asp?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetLegendGraphic&LAYER=Other_Towns&Format=image/png" alt="" style="border:none;"/><br /><br> <img src="http:// localhost /wms/streetmap.asp?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetLegendGraphic&LAYER=Minor_Towns&Format=image/png" alt="" style="border:none;"/><br /><br></div><br><br>Andrew<br><br>From: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] On Behalf Of Sophie GRAS<br>Sent: 15 October 2008 04:54 PM<br>To: users@openlayers<br>Subject: [OpenLayers-Users] Display legend<br><br>Hi everyone<br><br>I have a dumb question but i can't find the answer...<br>I have a mapfile with several layers and I use openlayers to display them.<br>In each layer I have some classes (representing percentage of the population) and I'd like to know how to display the legend of these classes using openlayers.<br>If i embed the legend in the mapfile, it works well but the legend is displayed on each tile. Is there a way to act differently?<br><br>Thanks<br><br>No virus found in this incoming message.<br>Checked by AVG - http://www.avg.com<br>Version: 8.0.173 / Virus Database: 270.8.0/1721 - Release Date: 10/14/2008 9:25 PM<br><br></div></body></html>