[mapserver-dev] MS_FOLLOW
Alan Boudreault
aboudreault at mapgears.com
Wed Feb 17 09:35:28 EST 2010
Robert,
To change the angle propety to MS_FOLLOW, I think you should use something
like:
$oLabel->set('autoangle', MS_FALSE);
$oLabel->set('autofollow', MS_FOLLOW);
Unfortunately, the "autofollow" property in PHP/Mapscript is only available in
MapServer 5.6. If you are building mapserver manually, the following patch
could be easily applied:
http://trac.osgeo.org/mapserver/changeset/9493
regards,
Alan
On February 17, 2010 05:37:28 am Robert Pivalone wrote:
> Hi,
>
> I have some troubles with PHP Mapscript (MapServer 5.4.2) and MS_FOLLOW.
>
>
>
> I would like to set the "ANGLE" property of a LabelObj with the value
> "FOLLOW".
>
>
>
> With the following code :
> $oMap = ms_newMapObj($szMapFile);
> $oLayer = $oMap->getLayerByName("layer3"); // type LINE
> $oClass = $oLayer->getClass(0);
> $oLabel = $oClass->label;
> $oLabel->set('autoangle', MS_FOLLOW);
> $oMap->save($szMapFile);
>
>
>
> In the mapfile, when "ANGLE" property was ANGLE 33 or ANGLE [angle] or
> ANGLE AUTO, "ANGLE" property doesn't change. Have you got any idea ?
>
> Many thanks.
>
> Robert
>
--
Alan Boudreault
Mapgears
http://www.mapgears.com
More information about the mapserver-dev
mailing list