[mapserver-users] Label Angle with MapScript 5

Gord Wall gwall at firstbasesolutions.com
Mon Jun 23 10:03:33 EDT 2008


I am using the MapScript API (php_mapscript_5000.so) to generate a map
file, but am running into some problems when trying to set the label
angle properties.

I can set the angle to a float using:
$oMsClass->label->set("angle", 45);
Output: ANGLE 45.000000

Setting the autoangle using
$oMsClass->label->set("autoangle", MS_TRUE);
Output: ANGLE AUTO

If i attempt to set the angle to a string using
$oMsClass->label->set("angle", "follow")
Which can be done directly in a mapfile (ANGLE follow)
Output: ANGLE 0.000000 (seems the string is being converted to float,
which IS what the angle property expects)

But when I want to set the autofollow property using
$oMsClass->label-set("autofollow", MS_TRUE);
I get the error "Fatal error: Property 'autofollow' does not exist in
this object"

The documentation on the website for the API is for version 4.10.  I
can't seem to find any docs for version 5.  Is anybody able to point me
to updated docs or help me with this specific issue.

Gord



More information about the mapserver-users mailing list