[Mapserver-users] HOW TO ADD LABELS TO POLYGONS/POINTS ?

Tyler Mitchell TMitchell at lignum.com
Thu Apr 1 11:54:43 EST 2004


You need to specify a LABELITEM (aka field or column from shape file dbf) 
in the LAYER definition so that it knows where to grab the text from.
Make sense?

mapserver-users-admin at lists.gis.umn.edu wrote on 04/01/2004 06:13:12 AM:

> Hi all
>     After much of work TIGER files directly with OGR connection I found 
that 
> adding layers is a fun with shp files !! I jus downloaded esri shape 
files 
> for couple of counties and its real good. But I am fighting to add 
labels to 
> the water polygon and landmark points layers .  I have shape files for 
> /Water Polygons /Landmark Polygons /Land polygons  /Geo graphic 
locations . 
> But addition of LABEL item to water polygon does nt work and also the 
> Geographic locations layer is not displayed at all !!! and same way 
labels 
> are not added to the land polygons ...This is my map file ...could any 
of 
> you help me ??
> 
> LAYER
> GROUP tigerdata
> NAME tgr33015wat
> TYPE POLYGON
> STATUS DEFAULT
> DATA "NH-RM/tgr33015wat"
> CLASS
>    NAME "Water Polygons"
>    COLOR 0 200 0
>    LABEL
>     MINFEATURESIZE 20
>     MINDISTANCE 100
>     BUFFER 10
>     ANGLE auto
>     POSITION auto
>     TYPE TRUETYPE
>     FONT arial
>     SIZE 8
>     COLOR 200 0 0
>     OUTLINECOLOR 255 255 255
>     ANTIALIAS true
>   END
> END
> END # layer ends
> LAYER
> GROUP tigerdata
> NAME tgr33015lpy
> TYPE POLYGON
> STATUS DEFAULT
> DATA "NH-RM/tgr33015lpy"
> CLASS
>    NAME "land Polygons"
>    COLOR 130 130 130
> END
> END # layer ends
> 
> LAYER
> GROUP tigerdata
> NAME tgr33015kgl
> TYPE POINT
> STATUS DEFAULT
> DATA "NH-RM/tgr33015kgl"
> CLASS
>    NAME "Ket Geo Locns"
>    COLOR 0 200 0
> END
> END # layer ends
> 
> _________________________________________________________________
> Get the best deals. On Electronics, Mobiles, Laptops. Log on to 
> www.baazee.com http://go.msnserver.com/IN/45530.asp
> 
> _______________________________________________
> Mapserver-users mailing list
> Mapserver-users at lists.gis.umn.edu
> http://lists.gis.umn.edu/mailman/listinfo/mapserver-users




More information about the mapserver-users mailing list