[mapserver-users] mode=legend
Léveillé, James
James.Leveille at mtq.gouv.qc.ca
Mon Jun 2 11:49:15 PDT 2008
Hi,
I'm trying to use MapServer in CGI mode to get a Legend in HTML format using
a TEMPLATE. My call :
http://localhost/mapserver5/mapserv.exe?map=d:\mymapfile.map&mode=legend&lay
er=mylayer
Starting from the example shown on
http://mapserver.gis.umn.edu/docs/howto/html_legend, here is my TEMPLATE
[leg_header_html]<table border="0" width="300" cellpadding="2"
cellspacing="2">[/leg_header_html]
[leg_class_html]
<tr>
<td valign="top">
<img src="[leg_icon width=20 height=14]" width=20 height=14>
</td>
<td bgcolor="#cccccc">
[leg_class_name]
</td>
</tr>
[/leg_class_html]
[leg_footer_html]</table>[/leg_footer_html]
And the LEGEND declaration in my MapFile :
LEGEND
IMAGECOLOR 255 255 255
STATUS ON
KEYSIZE 20 10
LABEL
COLOR 200 0 0
TYPE TRUETYPE
FONT "arial"
SIZE 9
END
TEMPLATE "D:\legend.html"
END
The problem is that the (temporary) images (icons) produced by MapServer for
the legend are slightly cut at the top and bottom.
For example, the result of a GetLegendGraphic call returned the following :
While images obtained in CGI mode (mode=legend) are :
QUESTION 1 : What explains this difference ?
QUESTION 2 : How can I specify the AGG image format in CGI mode ?
Regards
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20080602/e9ec378e/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Outlook.bmp
Type: image/bmp
Size: 9730 bytes
Desc: Outlook.bmp
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20080602/e9ec378e/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Outlook.bmp
Type: image/bmp
Size: 8870 bytes
Desc: Outlook.bmp
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20080602/e9ec378e/attachment-0001.bin>
More information about the MapServer-users
mailing list