geomoose / gm3

GeoMoose 3.0 Development. Please submit pull requests to the 'main' branch.
https://www.geomoose.org
MIT License
58 stars 60 forks source link

Configure arbitrary static Legend images #846

Closed tchaddad closed 3 months ago

tchaddad commented 11 months ago

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.

tchaddad commented 11 months ago

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

CAAU_Cassins_Auklet_summer_Legend

klassenjs commented 11 months ago
<map-source>
     ...
  <layer ...>
    ...
    <legend type="img">images/fancy_legend.gif</legend>
  </layer>
</map-source>
brentfraser commented 11 months ago

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

]]>
tchaddad commented 11 months ago

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