TYPE truetype

The Bun rosario.carbone at IPL.COM
Tue Jan 22 09:20:52 EST 2008


Hi 

It took many hours of work but at the end I solved. 
 
There are 4 important things to keep in mind:
 
1) My layer is a POINT layer but can be used as ANNOTATION layer, a LINE
layer may also be used as ANNOTATION, but differently from a LINE layer a
POINT layer hasn't an embedded orientation in the feature.
 
2) The TYPE TRUETYPE raised an error because the fonts.list file wasn't seen
by MapServer, and in this case I cannot understand why, but now I added the
full path:
 
FONTSET "C:\ms4w\apps\gmap\htdocs\fonts\fonts.list"
 
and it is OK.
 
3) Angle degrees in the my orientation column in my table were from 0 to
3600 and then I needed to divide by 10. Ordnance Survey set the orientation
precisely, keep in consideration decimal degrees.
 
4) Finally in the 5.0 version of MapServer LABELANGLEITEM, ANGLEITEM and
other macros for the mapfile have been dropped and replaced with new ones,
in this case the macro to use was ANGLE, in the LABEL section, anyway this
is a working example:
 
LAYER
    NAME cartotext
    DEBUG 3
    TYPE ANNOTATION
    STATUS ON
    CONNECTIONTYPE OGR
    CONNECTION
"MySQL:test,user=root,host=localhost,password=password,port=3306"
    DATA "mm_cartographictext_topo"
    UNITS METERS
    MAXSCALE 5000
    TOLERANCEUNITS DD
    SIZEUNITS PIXELS
    LABELITEM "textstring"
    LABELCACHE ON
    CLASS
        NAME "text class"
        STYLE # It is actually the point 
          COLOR 255 0 0 
          ANTIALIAS TRUE 
        END 
        LABEL
            TYPE TRUETYPE
            ANGLE [orientatio] 
            FONT "arial"
            MINSIZE 10
            MAXSIZE 20
            PARTIALS FALSE
            MINDISTANCE 20
            COLOR 0 0 0
            OUTLINECOLOR 255 255 255
        END
    END
END

N.B. "orientatio" is the name of a column in my table.

Regards
Rosario
-- 
View this message in context: http://www.nabble.com/TYPE-truetype-tp15001513p15019487.html
Sent from the Mapserver - User mailing list archive at Nabble.com.



More information about the mapserver-users mailing list