I've been using dlegend from the Minnesota DNR. It is based on the Yahoo YUI. Here's an example: www2.tetonwyo.org/mapserver/map.php You can define the legend in the map file's metadata.
Rich On Sat, Aug 15, 2009 at 5:59 AM, Bill Thoen<[email protected]> wrote: > Greetings All, > > What's the best way to create legends in an OpenLayers interface over > MapServer? Is there a way to use the MS HTML legends from a mapfile, or > do I have to start with GetLegendGraphic calls anyway? What I'd like is > a Legend / Layer Control from which I could show / hide layers and see > their current styles -- something like the type 3 legends described in > the MS docs here: > http://www.mapserver.org/output/html_legend.html#sample-site-using-the-html-legend. > But these templates seem to be usable only with MapServer; OpenLayers > doesn't appear to read a mapfile to that level. > > In the long run, however, what I really want is a Layer Control; one > that allows the user to change layer order, turn layers on and off, > change their styles, mark a layer as selectable and/or editable,and > group layers so that the groups can be moved up or down, made visible or > hidden, etc. as a group. That, I suppose, is a job for JavaScript or > something similar, which I can do if that's the best approach, but if > there's something ready to use out there already, I'd rather not > re-invent it. > > There always seems to be so many choices when you build your own that > sometimes I hardly know where to start! > > > Thanks, > - Bill Thoen > _______________________________________________ > Users mailing list > [email protected] > http://openlayers.org/mailman/listinfo/users > -- Richard Greenwood [email protected] www.greenwoodmap.com _______________________________________________ Users mailing list [email protected] http://openlayers.org/mailman/listinfo/users
