[Mapserver-users] Set scalebar properties

Dylan Keon keon at nacse.org
Mon May 26 07:51:59 PDT 2003


Daniel Morissette wrote:
> Dylan Keon wrote:
> 
>>Stefan Schwarzer wrote:
>>
>>>I would like to change the size of my scalebar dynamically in
>>>MapScript/PHP, but couldn't find anything in the mailing list archives.
>>>Does someone has an idea? Something like
>>> $scalebar = $map -> scalebarobj();
>>> $scalebar = set("width", 200);
>>
>>Try this:
>>
>>$map->{'scalebar'}->set('width', 200);
> 
> Does the Perl hash table notation ($map->{'scalebar'}->...) work with
> PHP objects?  I never tried it myself, but if the above doesn't work
> then try:
> 
>   $map->scalebar->set('width', 200)

For me, it works both ways.  IIRC, I was receiving PHP notice-level 
errors in the error_log when using the simpler syntax.  The Perl hash 
table notation worked for me at that time without giving any errors. 
Just tested it using the simpler syntax and I'm no longer getting errors.

--Dylan




More information about the MapServer-users mailing list