[Mapserver-users] processLegendTemplate
Daniel Morissette
dmorissette@dmsolutions.ca
Wed, 18 Feb 2004 16:19:46 -0500
Rene Teniere wrote:
> Hi All,
>
> I was wondering if someone could explain how the
> processLegendTemplate() function works. I have an existing MapServer
> legend template I would like to use (legend_template.html). How would I
> go about using it along with the $legend = $map->drawLegend(); and
> $legend_url = $legend->saveWebImage();? What do they mean by the results
> in a buffer?
>
processLegendTemplate() is for HTML templates only. You need to set
TEMPLATE legend_template.html in your mapfile (or via mapscript), and
then you call processLegendTemplate() which will return you a string
buffer (HTML) of the legend that's been generated. You can then print
that HTML in your script output at the position where you want the
legend to go.
With respect to $map->drawLegend(), it's for the traditional GIF legend
and doesn't do anything with the HTML templates.
Daniel
--
------------------------------------------------------------
Daniel Morissette dmorissette@dmsolutions.ca
DM Solutions Group http://www.dmsolutions.ca/
------------------------------------------------------------
_______________________________________________
Mapserver-users mailing list
Mapserver-users@lists.gis.umn.edu
http://lists.gis.umn.edu/mailman/listinfo/mapserver-users