[Mapserver-users] Set scalebar properties

Dylan Keon keon@nacse.org
Mon, 26 May 2003 07:51:59 -0700


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

_______________________________________________
Mapserver-users mailing list
Mapserver-users@lists.gis.umn.edu
http://lists.gis.umn.edu/mailman/listinfo/mapserver-users