Mapserver label background colour

المشرف العام

Administrator
طاقم الإدارة
I'm a totally newbie in Mapserver. I'm using mapserver 6.0.3. I have managed to label some lines but I cannot create a background colour for the labels.

Using QGIS 2.10 I got something near to what I'm trying to do with Mapserver. I tried to export using RT MapServer Exporter but the map file that was created didn't do the job at all.



Now, this is the map file that I have so far.

MAP FONTSET "H:/mapserver/data/fonts/fonts.list" EXTENT 19 33 30 42 IMAGETYPE "png24" NAME "airways" SIZE 1280 1024 STATUS ON LAYER NAME "airways" DATA "H:/mapserver/data/airways.shp" TYPE LINE LABELITEM "NAME" CLASS NAME "airways" LABEL COLOR 0 0 0 TYPE TRUETYPE FONT Vera SIZE 7 ANTIALIAS TRUE POSITION CC ANGLE AUTO END # end of label STYLE COLOR 0 0 0 WIDTH 0.25 END # STYLE END # CLASS END # LAYEREND # MAPThe output of this map file is the following



I have added in LABEL the following lines to create background colour for the labels, changing at the same time the color in LABEL to 255 255 255 (white font, black background)

STYLE GEOMTRANSFORM 'labelpoly' COLOR 0 0 0END # STYLEThe STYLE block was added exactly below the ANGLE AUTO. The resulted map is as follows.Unable to enter more than two links (i.e. images) as I have low rep. Only one label was drawn on the map, the last entry in my shape file.It has white color and black background but it's only one label.

Any guidance on how to keep all my labels with background color would be appreciated.



أكثر...
 
أعلى