[mapserver-users] How to give angle to labels with mapserver mapscript 5.0 and OGR:LabelAngle
Yvan Calcagni
yvan.calcagni at voila.fr
Thu Mar 13 03:04:59 PDT 2008
> Message du 12/03/08 à 21h54
> De : "Daniel Morissette" <dmorissette at mapgears.com>
> A : mapserver-users at lists.osgeo.org
> Copie à : yvan.calcagni at voila.fr
> Objet : Re: [mapserver-users] How to give angle to labels with mapserver mapscript 5.0 and OGR:LabelAngle
>
> Yvan Calcagni wrote:
> > Hi everybody,
> >
> > I have upgraded mapserver mapscript from 4.8 to 5.0 and I'm trying to render an annotation layer (with OGR connection)
with angles. With the 4.8, I was using class->set("anglelabelitem","OGR:LabelAngle"), because angles are embedded in the layer.
So now, as anglelabelitem doesn't exist anymore, I'm trying to use class->label->set("angle","OGR:LabelAngle")
but it gives me no result. It doesn't produce errors but label aren't oriented.
> >
> > If anyone have an idea...
> >
>
> In 5.0 we added the concept of attribute binding for some label and
> style properties, and that includes the label angle. See:
> http://trac.osgeo.org/mapserver/browser/branches/branch-5-0/mapserver/MIGRATION_GUIDE.TXT
>
> In PHP MapScript you should be able to use:
>
> $label->setBinding(MS_LABEL_BINDING_ANGLE, "OGR:LabelAngle");
>
> Daniel
> --
> Daniel Morissette
> http://www.mapgears.com/
>
>
Wow!!! Thanks Daniel, I didn't notice this specification!!! Everything works fine now.
See you. Yvan
More information about the MapServer-users
mailing list