<html>
<head>
<style type="text/css">
<!--
body { line-height: normal; font-variant: normal; margin-top: 4px; margin-bottom: 1px; margin-right: 4px; margin-left: 4px }
p { margin-top: 0; margin-bottom: 0 }
-->
</style>
</head>
<body bgcolor="#ffffff">
<p style="margin-top: 0; margin-bottom: 0">
<font size="3" face="Comic Sans MS">Vojko,</font> </p>
<br>
<p style="margin-top: 0; margin-bottom: 0">
<font size="3" face="Comic Sans MS">I don't believe that Raster layers have a Legend output option from MapServer, designated by the TYPE RASTER line in the mapfile. You can however make a dummy layer explicitly for generating a Legend entry. This dummy layer can be of some other type besides RASTER for example. </font> </p>
<br>
<p style="margin-top: 0; margin-bottom: 0">
<font size="3" face="Comic Sans MS">The next issue would be how to insert the legend graphic that you have predefined into the legend request. Since GEOMoose uses the mode=<something> parameter to request thing from mapserver, the typical legend is requested via the mode=legend process. This only works with the legend being defined in the same mapfile as the one that is used to generate the map image for the same layer.</font> </p>
<br>
<p style="margin-top: 0; margin-bottom: 0">
<font size="3" face="Comic Sans MS">I do see in the doc for MapServer CGI </font><font size="3" face="Comic Sans MS" color="#0000ff"><a href="http://mapserver.org/cgi/controls.html,"><i><u>http://mapserver.org/cgi/controls.html,</u></i></a></font><font size="3" face="Comic Sans MS"> that there is a LEGENDICON value option for the MODE parameter, but I don't think this is being used by GeoMoose currently. But it might be a good approach to follow moving forward on this. I've never used this myself.</font> </p>
<br>
<p style="margin-top: 0; margin-bottom: 0">
<font size="3" face="Comic Sans MS">There is no way that I know of currently to specify a predefined image in the LEGEND block in the mapfile. I did find a KEYIMAGE option in the CLASS help docs on the mapserver site. </font><font size="3" face="Comic Sans MS" color="#0000ff"><a href="http://mapserver.org/mapfile/class.html?highlight=icon"><i><u>http://mapserver.org/mapfile/class.html?highlight=icon</u></i></a></font><font size="3" face="Comic Sans MS"> This might be a way forward too. But I don't know that it will get around the TYPE RASTER thing for sure either.</font> </p>
<br>
<p style="margin-top: 0; margin-bottom: 0">
<font size="3" face="Comic Sans MS">bobb</font> </p>
<br> <br>
<p style="margin-top: 0; margin-bottom: 0">
<br>
<br>
>>> "Vojko Daneu" <vojko.daneu@mail.telepac.pt> wrote:<br> </p>
<div style="padding-left: 7px; margin-top: 0; background-color: #f3f3f3; margin-bottom: 0; margin-right: 0; border-left: solid 1px #050505; margin-left: 15px">
<div>
<p style="margin-top: 0; margin-bottom: 0">
<font size="2" face="Arial">Hallo,</font> </p>
</div>
<div>
<p style="margin-top: 0; margin-bottom: 0">
<font size="2" face="Arial">showing the legend of vector layers works without any problems in GeoMoose 1.6.</font> </p>
</div>
<div>
<p style="margin-top: 0; margin-bottom: 0">
<font size="2" face="Arial">In my application I have a raster layer for which I want also to show a legend in the side panel. To do so I have created a html-template with a legend image and some legend text. How do I show the template in the side panel?</font> </p>
</div>
<div>
<p style="margin-top: 0; margin-bottom: 0">
  </p>
</div>
<div>
<p style="margin-top: 0; margin-bottom: 0">
<font size="2" face="Arial">Here is my map-file, but it does not show the template ...</font> </p>
</div>
<div>
<p style="margin-top: 0; margin-bottom: 0">
  </p>
</div>
<div>
<p style="margin-top: 0; margin-bottom: 0">
MAP<br>    NAME 'mn_wind'<br>    SIZE 800 650<br>    STATUS ON<br>    EXTENT 391510 5935905 391710 5936205<br>    UNITS METERS<br>    IMAGETYPE PNG<br>    TRANSPARENT TRUE </p>
</div>
<div>
<p style="margin-top: 0; margin-bottom: 0">
<br>
    LEGEND<br>        STATUS ON<br>    END </p>
</div>
<div>
<p style="margin-top: 0; margin-bottom: 0">
<br>
    LAYER<br>        NAME 'Wind Velocity'<br>        DATA '00008_wind.png'<br>        TYPE RASTER<br>        STATUS DEFAULT<br>        CLASS<br>            NAME 'Wind Velocity'<br>            TEMPLATE 'test.html'<br>        END<br>    END </p>
</div>
<div>
<p style="margin-top: 0; margin-bottom: 0">
END<br><br><font size="2" face="Arial">Thanks,</font> </p>
</div>
<div>
<p style="margin-top: 0; margin-bottom: 0">
<font size="2" face="Arial">Vojko</font>
</p>
</div>
</div>
</body>
</html>