[PHPMapScript] Pb to set the angle property of a LabelObj

Daniel Morissette dmorissette at MAPGEARS.COM
Wed Apr 4 10:15:16 PDT 2007


Loïc MAZE wrote:
> Hi all,
>  
> I have some troubles with the current version of PHPMapScript. My 
> problem is very simple : I would like to set the "ANGLE" property of a 
> LabelObj with the value "FOLLOW". I have searched a way to do a such 
> thing but it was unsuccessful. The only thing I have found is how to set 
> this property with the value "AUTO" (with the following code : 
> $oLabel->set("autoangle", MS_AUTO); ).
>  

Um, it seems that the MS_FOLLOW constant is missing in PHP MapScript.

I have filed a bug about this and added the constant in both the dev 
version (future 5.0) and in the 4.10 branch (will be in 4.10.2):
http://mapserver.gis.umn.edu/bugs/show_bug.cgi?id=2058

As a workaround until you can upgrade, you should be able to use the 
following:

$oLabel->set("autoangle", MS_AUTO+2);

Daniel
-- 
Daniel Morissette
http://www.mapgears.com/



More information about the MapServer-users mailing list