Generating Legend Image with Python Mapscript

Tamas Szekeres 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>
>> wrote:
>>
>>>
>>> Bill,
>>>
>>> Consider using classObj.drawLegendIcon() to create an image only and
>>> then do the text labeling with ReportLab or whatever.
>>>
>>> cheers,
>>> Sean
>>>
>>> --
>>> Sean Gillies
>>> sgillies at frii dot com
>>> http://zcologia.com
>>
>>
>> Sean,
>>
>> How can I create an empty imageObj with a certain background color in
>> order to pass to classObj.drawLegendIcon() as a parameter?
>>
>>
>> Tamas Szekeres
>>
>>
>
>Tamas,
>
>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.
>
>Sean


Sean,

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.


Tamas Szekeres



More information about the mapserver-users mailing list