[mapserver-users] How do I get a Legend with a variable COLOR in the CLASS

Lime, Steve D (DNR) Steve.Lime at state.mn.us
Mon Jul 26 17:05:24 EDT 2010


Hi Worth: At the moment, you can't get a legend in this case. The legend code isn't smart 
Enough to discover potential colors and render them. Also, class names cannot be bound to an
attribute...

If you really need legends produced by MapServer then attribute binding probably isn't
going to work for you.

Steve

-----Original Message-----
From: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of Worth Lutz
Sent: Monday, July 26, 2010 9:27 AM
To: mapserver-users at lists.osgeo.org
Subject: [mapserver-users] How do I get a Legend with a variable COLOR in the CLASS

I'm trying to set my colors from a postgres table instead of having many
classes in my mapfile.  Here is an example of what I think I should use to
get a legend for this layer.

CLASS
  NAME [name]
  STYLE
    COLOR [color]
    OUTLINECOLOR 0 0 0
    WIDTH 1
  END
END


Only the NAME line dies with a parse error as it appears to be looking for a
string ([MapServer Error]: getString(): Parsing error near ([name])).  It
seems that the NAME line cannot take an attribute.

How do I get a legend for this layer?

Is this the method I should be using for this use?

Worth

_______________________________________________
mapserver-users mailing list
mapserver-users at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


More information about the mapserver-users mailing list