[mapserver-users] Legends and legend icons
Daniel Morissette
morissette at dmsolutions.ca
Thu Jan 24 09:29:10 PST 2002
Hi,
There have been some discussions with respect to generating legend icons
in the last few days, so I thought I should post some news with respect
to some work happening in this area:
- We have added new MapScript functions in the classObj to generate
legend icons. The same functions were added to both the PHP and
the SWIG (Perl, etc.) versions of MapScript.
See mapscript/php3/examples/test_draw_legend_icon.phtml for
an example of use. And here is the PHP docs:
int drawLegendIcon(int width, int height, imageObj im,
int dstX, int dstY)
Draw the legend icon on im object at dstX, dstY.
Returns MS_SUCCESS/MS_FAILURE.
gdImagePtr createLegendIcon(int width, int height)
Draw the legend icon and return a new imageObj.
- Changes to legendObj parameters:
OUTLINECOLOR will trigger a border around the legend icons
instead of a border around the whole legend image. Borders
around the legend image can still be generated using HTML tables
or stylesheets.
CORNER ROUND/SQUARE will be added to create a round legend
icon effect.
- There will be some changes with respect to the meaning of the
CLASS NAME parameter. CLASS NAME used to be used for labelling
classes in the legend, but this wasn't consistent with the meaning
of NAME in other places like layers where it is an object identifier.
So CLASS NAME will be used as a class identifier in the future,
and a new CLASS TITLE will be added to use for legend labels.
We'll also try to maintain some level of backwards compatibility
so that CLASS NAME will still work for labelling the legend with
old mapfiles that do not make any use of the new CLASS TITLE.
I believe Steve is going to make that change in the next few days.
- Finally, for the mapserv CGI users, there is some work underway to
generate HTML legends using HTML templates... more on this in the
next few weeks.
Best Regards,
--
------------------------------------------------------------
Daniel Morissette morissette at dmsolutions.ca
DM Solutions Group http://www.dmsolutions.ca/
------------------------------------------------------------
Don't put for tomorrow what you can do today, because if
you enjoy it today you can do it again tomorrow.
More information about the MapServer-users
mailing list