<div dir="ltr">Hey Michael,<div><br></div><div>This may not be what you are looking for but I use dLegend which is a legend generator that Steve Lime and his staff wrote a long time ago. Here's an example:</div><div><a href="https://maps.greenwoodmap.com/sublette/mapserver/map#zcr=1/2690000/1170000/0&lyrs=public,townlim,ownership,roads">https://maps.greenwoodmap.com/sublette/mapserver/map#zcr=1/2690000/1170000/0&lyrs=public,townlim,ownership,roads</a><br></div><div>It parses a map file. It pulls out styles and classes from the layer definitions and reads some dLegend specific keys in the METADATA block. It writes out JSON (look at the legend.js in the example). It uses PHP MapScript to parse the map file. It's got some nice options. </div><div><br></div><div>Rich</div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Sep 3, 2024 at 8:29 AM Michael Smith via MapServer-users <<a href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="msg-4289732045247513399"><div lang="EN-US" style="overflow-wrap: break-word;"><div class="m_-4289732045247513399WordSection1"><p class="MsoNormal">Hi everyone, <u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">I’ve used MapServer html legends before and had them work well. Now I have a development group that wants the output in json. Was wondering if anyone had an html template for legends the generates them in json?<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">Mike<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal"><u></u> <u></u></p><div><div><p class="MsoNormal"><span>-- <u></u><u></u></span></p></div><div><p class="MsoNormal"><span>Michael Smith<u></u><u></u></span></p><p class="MsoNormal"><span>Remote Sensing/GIS Center<u></u><u></u></span></p><p class="MsoNormal"><span>US Army Corps of Engineers</span><u></u><u></u></p></div></div><p class="MsoNormal"><u></u> <u></u></p></div></div>
_______________________________________________<br>
MapServer-users mailing list<br>
<a href="mailto:MapServer-users@lists.osgeo.org" target="_blank">MapServer-users@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/mapserver-users" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/mapserver-users</a><br>
</div></blockquote></div><br clear="all"><div><br></div><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature"><div dir="ltr">Richard W. Greenwood<br><a href="http://www.greenwoodmap.com" target="_blank">www.greenwoodmap.com</a></div></div>