Generating Legend Image with Python Mapscript
szekeres.tamas at FREEMAIL.HU
Tue Sep 27 18:32:46 EDT 2005
On Tue, 27 Sep 2005 16:16:23 -0600, Sean Gillies <sgillies at FRII.COM> wrote:
>On Sep 27, 2005, at 4:05 PM, Tamas Szekeres wrote:
>> On Tue, 27 Sep 2005 10:07:35 -0600, Sean Gillies <sgillies at FRII.COM>
>>> Consider using classObj.drawLegendIcon() to create an image only and
>>> then do the text labeling with ReportLab or whatever.
>>> Sean Gillies
>>> sgillies at frii dot com
>> How can I create an empty imageObj with a certain background color in
>> order to pass to classObj.drawLegendIcon() as a parameter?
>> Tamas Szekeres
>My earlier suggestion was slightly off. classObj.createLegendIcon()
>will create an icon for the class, using the map's legend.imagecolor as
>the background color.
It would be desirable to set the legend key image size smaller than the
legend image, otherwise some of the images will be clipped (eg thick
lines). classObj.createLegendIcon() does not support this separation.
More information about the mapserver-users