[Mapserver-users] processLegendTemplate
Rene Teniere
tenierer at gov.ns.ca
Thu Feb 19 06:28:59 PST 2004
Thank you, that helps a lot. Now if I could only get to work since we
have about half a metre of snow here in Nova Scotia!
Rene
Rene J.R. Teniere - BSc., D.GIS
GIS Technician
Nova Scotia Department of Natural Resources
Forestry Division (GIS) - Truro
Phone: (902) 893-5655
Mobile: (902) 209-8956
>>> Daniel Morissette <dmorissette at dmsolutions.ca> 02/18/04 5:19 PM >>>
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