[Mapserver-users] processLegendTemplate
Daniel Morissette
dmorissette at dmsolutions.ca
Wed Feb 18 13:19:46 PST 2004
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 at dmsolutions.ca
DM Solutions Group http://www.dmsolutions.ca/
------------------------------------------------------------
More information about the MapServer-users
mailing list