[mapserver-users] Line label upset down in Chinese

wang pearce pearce.wang at gmail.com
Tue May 6 00:37:47 EDT 2008


Hi:
   In my mapserver application,Chinese language, I found the label for some
road are upset down.

   For example, I have a vertical road in the map, and the label is "C1 C2
C3 C4". If the line vector is from top to bottom, so I will have a label of
"C1 C2 C3 C4", but if the line vector draws from bottom to top, so the label
will be displayed from the bottom, and I will get a label like "C4 C3 C2 C1"
from top to bottom.

    I think it's because Chinese is not alphabet language, it's char by char
label.

    I tried to modify label attribute "ANGLE" to auto, follow, but no use.
I tried to modified "ANGLE" to a fixed number, it shows the label will not
follow the road line.

here is a screen shot:
http://www.abovecloud.com/tmp/mapserv1.png

     How to make the label follow the road by first character appears on top
of the line?

Thanks.

My font file:
# This be the fonts list
fz        simfang.ttf

My map file:

MAP
 IMAGETYPE PNG
 EXTENT 116.2101 39.81697 116.559 40.0301
 SIZE           800 600 #400
 IMAGECOLOR     235 234 232

 SHAPEPATH "/gis/data/sw/01"
 FONTSET  "/gis/maps/fonts/fonts.list"
 SYMBOLSET "/gis/maps/symbols/symbols.sym"
 UNITS  DD

LAYER
 NAME "LEVEL0"
 CONNECTIONTYPE OGR
 CONNECTION "R.TAB"
 STATUS OFF
 TYPE LINE

 CLASSITEM "KIND"
 LABELITEM "PATHNAME"


 CLASS
  NAME "CHW"
  EXPRESSION ('[KIND]'='0101' || '[KIND]'='0102' || '[KIND]'='0103' ||
'[KIND]'='0105' || '[KIND]'='0107')
  STYLE
   COLOR 210 208 205
   WIDTH 7
  END
  STYLE
   COLOR 241 190 35
   WIDTH 5
  END
  LABEL
   COLOR 86 121 190
   SHADOWCOLOR 255 255 255
   #SHADOWSIZE 2 2
   TYPE TRUETYPE
   FONT fz
   SIZE 10
   ANTIALIAS TRUE
   POSITION CC
   PARTIALS FALSE
   MINDISTANCE 300
   BUFFER 4
   encoding gb2312
   ANGLE follow
  END #LABEL
 END

END
END
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapserver-users/attachments/20080506/6b45caf5/attachment.html


More information about the mapserver-users mailing list