geomoose/gm3

Configure arbitrary static Legend images

Closed this issue · 4 comments

I found a snippet in some old docs, of a previously supported way to display an arbitrary legend graphic:

   <layer title="Parcels" src="parcels/parcels" metadata="true" legend="true" tip="this a parcel layer, y'all" show-legend="true">
          <metadata>http://www.geomoose.org/docs/</metadata>
          <legend>images/fancy_legend.gif</legend>
    </layer>

This doesn't seem to be supported in GM 3 any longer (though maybe I failed to get it to work).

If it was dropped, I'm thinking it would be a nice thing to support again, as it can be handy in situations where a legend might be more complicated than something that any service can generate.

An example of what I mean by an arbitrary complex legend graphic:

CAAU_Cassins_Auklet_summer_Legend

<map-source>
     ...
  <layer ...>
    ...
    <legend type="img">images/fancy_legend.gif</legend>
  </layer>
</map-source>

Here's more examples:

        <legend type="html"><![CDATA[
           <img src="logo-mini.png">
           <span style="color:green">GeoMoose Sightings</span><br>
           <span style="color:red">&#128014; GeoHorse Sightings</span><br>
       ]]></legend>

and

       <legend type="html"><![CDATA[
           <img width="100" height="100" src="https://c.tile.openstreetmap.org/12/987/1478.png">
       ]]></legend>

Ah great, I will give these a try, and then add to the how-tos...