<html>
<head>
</head>
<body style="font-variant: normal; font-style: normal; font-weight: normal; margin-bottom: 1px; font-size: 12pt; line-height: normal; margin-top: 4px; margin-left: 4px; font-family: Comic Sans MS; margin-right: 4px">
<p style="margin-top: 0; margin-bottom: 0">
<font size="3" face="Comic Sans MS">Christopher,</font> </p>
<br>
<p style="margin-top: 0; margin-bottom: 0">
<font size="3" face="Comic Sans MS">Thanks for the reply. That's interesting that there is no way to add in a Legend (right now).</font> </p>
<br>
<p style="margin-top: 0; margin-bottom: 0">
<font size="3" face="Comic Sans MS">I did mange to get something to appear (by slightly cheating), reload the link . . .. I just added in some HTML to the Title for Line breaks, and Image SRC links. Seemed to work pretty good. But then I noticed that it would be nice to have the Legend graphic disappear when the layer was toggled off. I keep making work for myself. I have no idea what this approach might break along the way. I could expand on this and try to build in a dynamic Legend item I suppose, but it doesn't seem like the right approach to take. I not much at Javascript either. More of an "example tweeker" as far as Javascript goes.</font> </p>
<br>
<p style="margin-top: 0; margin-bottom: 0">
<font size="3" face="Comic Sans MS">I'm doing something really quick and dirty right now. But I suspect that I may be doing more of these in the future.</font> </p>
<br>
<p style="margin-top: 0; margin-bottom: 0">
<font size="3" face="Comic Sans MS">bobb</font> </p>
<br>
<p style="margin-top: 0; margin-bottom: 0">
<br>
<br>
>>> <christopher.schmidt@nokia.com> wrote:<br> </p>
<table bgcolor="#f3f3f3" style="margin-bottom: 0; font-size: 1em; margin-top: 0; margin-left: 15px; margin-right: 0" border="0">
<tr>
<td>
<div style="border-left: solid 1px #050505; padding-left: 7px">
<p style="margin-top: 0; margin-bottom: 0">
<br>
On Jun 17, 2011, at 5:45 PM, ext Bob Basques wrote:<br><br>> All,<br>><br>> Playing around with my first (official) Openlayers Viewer.  <a href="http://pwultra5.ci.stpaul.mn.us/ol/ol.03.html">http://pwultra5.ci.stpaul.mn.us/ol/ol.03.html</a><br>><br>> A couple of questions:<br>><br>> 1.)  How do I add in a Legend Graphic for each layer to the LayerSwitcher from a MapServer CGI call?<br>> For example, here is the call to a legend for the Street centerlines: <a href="http://gis.ci.stpaul.mn.us/datasets/SHP/METC/TLG/CENTERLINES_TLG/tlg_googlish1_public.map?mapext=524489.6712328767%20136826.90753424657%20618818.3287671233%20172992.09246575343&mapsize=1072%20411&mode=legend">http://gis.ci.stpaul.mn.us/datasets/SHP/METC/TLG/CENTERLINES_TLG/tlg_googlish1_public.map?mapext=524489.6712328767%20136826.90753424657%20618818.3287671233%20172992.09246575343&mapsize=1072%20411&mode=legend</a><br>> I did find some examples for WMS, but they didn't seem to be what I was looking for.<br><br>You'll probably need to write your own LayerSwitcher. We don't have any supported way<br>of doing this that I'm aware of; there are a few hacks out there that people have<br>done, but I don't think we've integrated them into the LayerSwitcher in trunk.<br><br>> 2.)  How do I set the Layer Switcher to be activated (displayed) by default (vs closed on startup)?<br><br><a href="http://dev.openlayers.org/docs/files/OpenLayers/Control/LayerSwitcher-js.html#OpenLayers.Control.LayerSwitcher.maximizeControl">http://dev.openlayers.org/docs/files/OpenLayers/Control/LayerSwitcher-js.html#OpenLayers.Control.LayerSwitcher.maximizeControl</a><br><br>> bobb<br>> _______________________________________________<br>> Dev mailing list<br>> Dev@lists.osgeo.org<br>> <a href="http://lists.osgeo.org/mailman/listinfo/openlayers-dev">http://lists.osgeo.org/mailman/listinfo/openlayers-dev</a><br><br>
</p>
</div>
</td>
</tr>
</table>
</body>
</html>