[mapserver-users] labelObj question - PHP
Dylan Keon
keon at nacse.org
Thu Nov 14 22:59:12 PST 2002
>> Since there isn't a getLabel method, what is the PHP syntax for
>> setting label parameters? The closest I could find in the archives
>> is something like $layerClass->{label}->set('size', 20); but that
>> didn't work.
>
> Well, I didn't try it myself before writing this, but what you did
> should work: $layerClass->{label}->set('size', 20)
>
> Are you sure that's it's not something else that you're missing
> such as the label type (TRUETYPE)?
>
> $layerClass->{label}->set('size', 20)
Thanks, Daniel.
For the list archives: that is the correct syntax. Knowing that helped
me troubleshoot my problem, which was that I had the class index order
reversed when using $layer->getClass(). The other label parameters
(such as TRUETYPE) are already set in the mapfile, I just needed to
change the label size dynamically.
Thanks again,
Dylan
More information about the MapServer-users
mailing list