If a LABEL from an annotation layer in a .map file has no SIZE attribute, the
annotations will still be rendered with a very small font (size 1?). On the
other hand, if the layer/class is created from php_mapscript and the
$class->label->size is not defined, the annotations will not be rendered at all.
LAYER
NAME "tekstparc"
DATA tekstparc
MAXSCALE 5000
STATUS DEFAULT
TYPE ANNOTATION
LABELITEM "CAT_ID"
CLASSITEM "CAT_ID"
CLASS
COLOR -1 -1 -1
LABEL
COLOR 40 40 80
SHADOWCOLOR -1 38 38
TYPE TRUETYPE
ANTIALIAS TRUE
FONT verdana
# SIZE 10
POSITION CC
PARTIALS TRUE
BUFFER 2
END
END
END
$lay = ms_newLayerObj($map);
$lay->set("data", "tekstulice");
$lay->set('type', MS_LAYER_ANNOTATION);
$lay->set('maxscale',5000);
$lay->set('status', MS_ON);
$lay->set('labelitem', "TEXTSTRING");
$lay->set('classitem', "TEXT_ANGLE");
$lay->set('labelangleitem', "TEXT_ANGLE");
$lclass = ms_newClassObj($lay);
$lclass->label->set('shadowsizex', 1);
$lclass->label->set('shadowsizey', 1);
$lclass->label->set('angle', 45.0);
$lclass->label->set('type', MS_TRUETYPE);
$lclass->label->set('font', "verdana");
#$lclass->label->set('size', 10); # bez ovoga NE RADI !
$lclass->label->set('antialias', MS_TRUE);
$lclass->label->set('partials', MS_FALSE);
$lclass->label->set('buffer', 2);
$lclass->label->set('position', MS_UR);