[Mapserver-users] Re: html-type legends with perl mapscript

Puneet Kishor pkishor at geoanalytics.com
Tue May 27 11:33:07 EDT 2003


On Tuesday, May 27, 2003, at 09:53  AM, Daniel Morissette wrote:

> Puneet Kishor wrote:
>>
>> I am not sure how I am going to implement this eventually, but for now
>> I want to try out a separate legend icon for each layer. If a layer 
>> has
>> more than one classes then I want a single image with all the key 
>> boxes
>> for each class stacked one below another. So, this is what I tried in
>> my read-write perl ;-) --
>>
>
> Maybe a possible trick would be that for each layer you call
> $map->drawLegend() after setting all other layers status to OFF.  This
> way every call to drawLegend() would draw only a single layer and you
> would not have to worry about building the legend image and placing the
> icons and labels yourself, etc.
>

oh yeah. been there, done that. The problem with that approach is it 
also draws the names of the layers (classes). I only want the 
itty-bitty keybox. Eventually I want to create (html legends) with 
keyboxes I can click on and open up color-selectors, and layer names 
with checkboxes I can use to turn them on or off, or entire layer 
elements I can select for querying purposes, etc. See, I need to be 
able to build the individual components of a legend/layer control... 
and the keybox is one of the denominators. drawLegendIcon seems to be 
the ticket, as soon as I get it working, that is.

Thanks,

pk/




More information about the mapserver-users mailing list