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

Worth Lutz wal3 at mindspring.com
Mon Jul 26 10:26:33 EDT 2010


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



More information about the mapserver-users mailing list