[mapserver-users] legend "feature"?
TCHaddad
TCHaddad at cshore.com
Fri Aug 30 14:53:15 PDT 2002
Hello,
I just inserted a whole bunch of scale dependant classes into the layers in my mapfile, so that the symbology in my maps will change as the user zooms in and out. works very well visually.
However, I noticed that now if I generate a legend at a particular zoom level, I get all the symbols associated with every layer displayed in the map. For example, I get 3 legend entries with 3 different symbols when I turn on the layer defined below:
LAYER
NAME ushighway
GROUP Roads
STATUS OFF
TYPE LINE
DATA "D:/gis/ushwy"
#MINSCALE
MAXSCALE 3000000
CLASS
MAXSCALE 100000
NAME "US Highway"
TEMPLATE "ttf.htm"
SYMBOL 'circle1'
COLOR 54 54 54
SIZE 3
OVERLAYSYMBOL 'circle1'
OVERLAYCOLOR 25 25 112
OVERLAYSIZE 1
END
CLASS
MAXSCALE 700000
MINSCALE 100001
NAME "US Highway"
SYMBOL 'circle1'
COLOR 25 25 112
SIZE 2
END
CLASS
MINSCALE 700001
NAME "US Highway"
TEMPLATE "ttf.htm"
SYMBOL 'circle1'
COLOR 130 130 130
SIZE 1
END
END
I understand if I take out the NAME item from 2 of the Classes, that I will only get one legend entry per layer, but then nothing garuntees that my legend will have the correct symbol according to my zoom level.
Is there something I am missing in my definition of the Layer, or is this a "feature" of how legends work?
TH
More information about the MapServer-users
mailing list