Generating Legend Image with Python Mapscript

Sean Gillies sgillies at FRII.COM
Tue Sep 27 18:16:23 EDT 2005


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



More information about the mapserver-users mailing list