<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div style="-webkit-text-size-adjust: auto; ">Hi Samuel,</div><div style="-webkit-text-size-adjust: auto; "><br></div><div style="-webkit-text-size-adjust: auto; ">I use attribution (thanks to Phil for the idea), here you have a good example: <span style="font-size: 15px; line-height: 19px; white-space: nowrap; -webkit-tap-highlight-color: rgba(26, 26, 26, 0.296875); -webkit-composition-fill-color: rgba(175, 192, 227, 0.230469); -webkit-composition-frame-color: rgba(77, 128, 180, 0.230469); -webkit-text-size-adjust: none; "><a href="http://stackoverflow.com/questions/5539633/adding-a-absolutely-positioned-div-to-the-bottom-of-an-openlayers-map/5568762#5568762">http://stackoverflow.com/questions/5539633/adding-a-absolutely-positioned-div-to-the-bottom-of-an-openlayers-map/5568762#5568762</a></span></div><div><span style="font-size: 15px; line-height: 19px; white-space: nowrap; -webkit-tap-highlight-color: rgba(26, 26, 26, 0.292969); -webkit-composition-fill-color: rgba(175, 192, 227, 0.230469); -webkit-composition-frame-color: rgba(77, 128, 180, 0.230469);"><br></span></div><div><span style="font-size: 15px; line-height: 19px; white-space: nowrap; -webkit-tap-highlight-color: rgba(26, 26, 26, 0.292969); -webkit-composition-fill-color: rgba(175, 192, 227, 0.230469); -webkit-composition-frame-color: rgba(77, 128, 180, 0.230469);">Cheers </span></div><div><span style="font-size: 15px; line-height: 19px; white-space: nowrap; -webkit-tap-highlight-color: rgba(26, 26, 26, 0.292969); -webkit-composition-fill-color: rgba(175, 192, 227, 0.230469); -webkit-composition-frame-color: rgba(77, 128, 180, 0.230469);"><br></span></div><div><span style="font-size: 15px; line-height: 19px; white-space: nowrap; -webkit-tap-highlight-color: rgba(26, 26, 26, 0.292969); -webkit-composition-fill-color: rgba(175, 192, 227, 0.230469); -webkit-composition-frame-color: rgba(77, 128, 180, 0.230469);">Gery<br></span><br><span style="-webkit-text-size-adjust: auto;">Sent from my iRon</span></div><div style="-webkit-text-size-adjust: auto; "><br>On May 15, 2013, at 20:08, "Samuel Gilbert" <<a href="mailto:samuel.gilbert@ec.gc.ca">samuel.gilbert@ec.gc.ca</a>> wrote:<br><br></div><div style="-webkit-text-size-adjust: auto; "><span>Hello,</span><br><span></span><br><span>I'm using OpenLayer to display forecasted air pollutant concentrations and </span><br><span>rain from radar scans.  The layers I display are therefore color graduated.  I </span><br><span>would like to add a color scale to the map to make the correspondence between </span><br><span>the color and the forecasted concentration or rain intensity.  Since the </span><br><span>application will be used in full-screen mode, I would like the legend to float </span><br><span>over the map like the zoom controls.</span><br><span></span><br><span>The WMS GetCapabilities does list styles from the layers and contains </span><br><span>LegendURL elements with links to the actual resource.</span><br><span></span><br><span>"Format/WMSCapabilities/v1_1.js" defines the function GetLegendGraphic, but </span><br><span>it's not used anywhere else in the OpenLayer(version 2.12) code.</span><br><span></span><br><span>What would be the best way to add the legend over the map?  I could copy and </span><br><span>modify "Control/Attribution.js", but is there a better way to do this?  Also, </span><br><span>ideally I would like to make a link with the currently displayed layer and the </span><br><span>retrieval and display of the legend.</span><br><span></span><br><span>Cheers,</span><br><span></span><br><span>Samuel</span><br><span>_______________________________________________</span><br><span>Users mailing list</span><br><span><a href="mailto:Users@lists.osgeo.org">Users@lists.osgeo.org</a></span><br><span><a href="http://lists.osgeo.org/mailman/listinfo/openlayers-users">http://lists.osgeo.org/mailman/listinfo/openlayers-users</a></span><br></div></body></html>