[mapserver-users] Displaying a string instead of a label
Adrian Popa
adrian_gh.popa at romtelecom.ro
Wed Jul 15 01:49:02 PDT 2009
Thank you Charlotte,
I will give it a try!
Regards,
Adrian
Charlotte Declercq wrote:
> Hi Adrian,
>
> You can set the TEXT property of the CLASS object like this :
>
> CLASS
> NAME "departement"
> LABEL
> ANGLE 0.000000
> ANTIALIAS TRUE
> FONT "Arial"
> MAXSIZE 256
> MINSIZE 4
> SIZE 8
> TYPE TRUETYPE
> BUFFER 0
> COLOR 0 0 0
> FORCE FALSE
> MINDISTANCE -1
> MINFEATURESIZE -1
> OFFSET 1 1
> PARTIALS TRUE
> POSITION CC
> SHADOWCOLOR 0 0 0
> END
> STYLE
> ANGLE 360
> COLOR 232 246 9
> OPACITY 100
> SIZE 10
> SYMBOL "Carre"
> END
> TEXT "my static text"
> END
>
> It will override the label. You don't need CLASSITEM, LABELITEM,
> LABELMAXSCALEDENOM and LABELMINSCADENOM but you need the LABEL object.
> The documentation is here : http://mapserver.org/mapfile/class.html
>
> /TEXT [string]/
> /Static text to label features in this class with. This overrides
> values obtained from the LABELTIEM. The string may be given as an
> expression delimited using the ()’s. This allows you to concatenate
> multiple attributes into a single label. For example:
> ([FIRSTNAME],[LASTNAME])./
>
>
> I think you can set the TEXT property on classical layer types such as
> POLYGON, LINE, POINT, not only ANNOTATION.
> If you use ANNOTATION, then the text will be placed at the centroid of
> the polygon of the middle of the line.
>
> Regards,
>
More information about the MapServer-users
mailing list