Class Labels
Tim Badtke
timbadtke at GMAIL.COM
Wed Jun 14 13:58:38 PDT 2006
I'm developing an application and would like the ability to turn a class on
at a certain scale, but have it's labels turn on as a user zooms in
further. Is this possible with one layer defition and two classes (one for
the data and one for it's labels - both come from the same dataset.)
I set it up how I think it should work but I only get the data drawn without
the labels. Can someone point me in the right direction? It works with two
layers (one as polygon and one as annotation), but I think it should be able
to be done with just one layer and two classes. Am I wrong?
Thanks for your help,
Tim
This is what the layer looks like in the map file:
LAYER
NAME "MCD Boundaries"
STATUS default
DATA basedata/cdreg_ms
GROUP MCDs
TYPE POLYGON
CLASSITEM "Ctv"
LABELITEM "Mcd_name"
CLASS
MAXSCALE 600000
EXPRESSION ('[Ctv]' eq 'T')
OUTLINECOLOR 19 54 234
STYLE
SYMBOL 'line'
SIZE 1
END
END
CLASS
MAXSCALE 400000
EXPRESSION ('[Ctv]' eq 'T')
LABEL #Town label
COLOR 19 54 234
OUTLINECOLOR 255 255 255
TYPE Bitmap
SIZE Tiny
POSITION CC
PARTIALS False
END
END
METADATA
CLASSES "no"
SHOWINLEGEND "nope"
END
END
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20060614/2c326fbf/attachment.htm>
More information about the MapServer-users
mailing list