[mapserver-users] mapfile annotation underlined text

Flavio Hendry flavio at tydac.ch
Thu Oct 14 04:05:43 EDT 2010


Hi Diana

There is a little trick to do that, if you do not mind the text being 
"backgrounded". Just put the layer twice in the mapfile, once with a 
backgroundshadowcolor, once without and with an offset of 1 0.

Result see: http://www.tydac.ch/underline.gif

LAYER
     NAME "Grundstücksnummern"
...
     STATUS ON
     LABELITEM "gs_nummer"
     SIZEUNITS feet
         CLASS
             COLOR -1 -1 -1
             LABEL
                 ANTIALIAS TRUE
                 TYPE TRUETYPE
                 FONT "cadastra"
                 POSITION ur
                 SIZE 5
                 COLOR 0 0 0
                 OFFSET 1 0
                 BACKGROUNDCOLOR 255 255 255
                 FORCE true
             END
         END
     PROJECTION
      "init=epsg:21781"
     END
END


LAYER
     NAME "Grundstücksnummern"
...
     STATUS ON
     LABELITEM "gs_nummer"
     SIZEUNITS feet
         CLASS
             COLOR -1 -1 -1
             LABEL
                 ANTIALIAS TRUE
                 TYPE TRUETYPE
                 FONT "cadastra"
                 POSITION ur
                 SIZE 5
                 COLOR 0 0 0
                 BACKGROUNDCOLOR 255 255 255
                 BACKGROUNDSHADOWCOLOR 0 0 0
                 FORCE true
             END
         END
     PROJECTION
      "init=epsg:21781"
     END
END

-- 
Mit freundlichem Gruss / Best regards
Flavio Hendry

----------------------------------------------------------------
TYDAC Inc.  - http://www.tydac.ch
Web Mapping - http://www.mapserver.ch
Swiss Maps  - http://www.mapplus.ch
----------------------------------------------------------------
############      Mit freundlichen Gruessen / Kind Regards
############     Flavio Hendry, CEO - mailto:flavio at tydac.ch
############         TYDAC AG - http://www.tydac.ch
####    ####        Geographic Information Solutions
####    ####       Optingenstrasse 27 -- CH-3013 Bern
############   Tel +41 (0)31 368 0180 - Fax +41 (0)31 368 1860
----------------------------------------------------------------
    Location: http://www.mapplus.ch/adr/bern/optingenstrasse/27
----------------------------------------------------------------



More information about the mapserver-users mailing list