[mapserver-users] Re: labelObj question - PHP

Dylan Keon keon at nacse.org
Thu Nov 7 11:59:53 EST 2002


Hi listers,

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.

Thanks for any tips.

--Dylan


 > I'd like to change label text size and symbol size for a couple of
 > layers as part of a conditional statement in PHP MapScript.  I'm able
 > to change the symbol size just fine:
 >
 >     $layer = $map->getLayerByName('sites');
 >     $layerClass = $layer->getClass(0);
 >     $layerClass->set('size', 16);
 >
 > However, I can't figure out how to change the label text size.  I see
 > there is a labelObj member to classObj, but can't seem to figure out
 > the correct syntax to access it.  Can someone give me a hint?
 >
 > Thanks. :-)





More information about the mapserver-users mailing list