[Mapserver-users] Building a legend - with class objects in layers

Eric Bridger eric at gomoos.org
Tue Jun 15 09:11:52 EDT 2004


On Tue, 2004-06-15 at 04:42, Richard Orchard wrote:
> hi,
> 
> I am using mapserver to display some geology datasets.
> 
> A particular layer has multiple classes in order to show the various
> features (different rock types).  The features are color-coded, therefore, i
> need each feature (class) to display in the legend.
> 
> However, when the legend is generated, it just creates one item, based on
> the layer name.  it doesn't iterate through the various class objects.
> 
> Is this the way it is supposed to work? 

Yes.

 Or is there a way to get it to
> create a legend item for each class item within a layer.  At present i am
> creating new layer objects for each item i want to display.  I have put the
> map file i am using at the bottom of this email.
> 

The map file you sent has only one class per layer. Perhaps you should
send the map file which is not working as you expect.  Each CLASS must
have a NAME for it to show up in the legend.






More information about the mapserver-users mailing list