Generating Legend Image with Python Mapscript

Tamas Szekeres szekeres.tamas at FREEMAIL.HU
Tue Sep 27 18:05:13 EDT 2005


On Tue, 27 Sep 2005 10:07:35 -0600, Sean Gillies <sgillies at FRII.COM> wrote:

>On Sep 27, 2005, at 9:07 AM, William Hudspeth wrote:
>
>> Hello,
>>
>> I am trying to insert a legend image into a dynamically generated PDF
>> file. Using the mapObj.drawLegend() method, I can easily accomplish
>> this, but can't do much about the appearance of the legend. I would
>> like
>> to have more control over the font properties, etc., and have tried
>> using the mapObj.legend.label settings, but haven't figured out how to
>> export out an independent image. I would appreciate any suggestions on
>> how I might generate a legend image over which I have some more control
>> with regard to fonts.
>>
>> Thanks, Bill
>>
>>
>
>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



More information about the mapserver-users mailing list