[Mapserver-users] Set scalebar properties

Stefan Schwarzer stefan.schwarzer at grid.unep.ch
Mon May 26 08:33:30 EDT 2003


--=====================_1205641651==.ALT
Content-Type: text/plain; charset="us-ascii"; format=flowed


Right, it works that way in PHP:

         $map -> scalebar -> set('width', 200);



>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);
>
>--
>------------------------------------------------------------
>  Daniel Morissette               morissette at dmsolutions.ca
>  DM Solutions Group              http://www.dmsolutions.ca/
>------------------------------------------------------------

         _______________________________________

         Stefan Schwarzer
         Consultant on GEO

         UNEP/DEWA/GRID-Geneva
         Chemin des Anemones 11
         CH - 1219 Chatelaine
         Switzerland

         Tel: (+41) 22.917.83.49
         Fax: (+41) 22.917.80.29

         Email: stefan.schwarzer at grid.unep.ch
         Internet: http://geodata.grid.unep.ch/
         _______________________________________ 
--=====================_1205641651==.ALT
Content-Type: text/html; charset="us-ascii"

<html>
<body>
<font size=3><br>
Right, it works that way in PHP: <br>
<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab><br>
<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab><b>$map
-&gt; scalebar -&gt; set('width', 200);<br><br>
<br><br>
</b><blockquote type=cite class=cite cite>Dylan Keon wrote:<br>
&gt; <br>
&gt; Stefan Schwarzer wrote:<br>
&gt; &gt; <br>
&gt; &gt; I would like to change the size of my scalebar dynamically
in<br>
&gt; &gt; MapScript/PHP, but couldn't find anything in the mailing list
archives.<br>
&gt; &gt; Does someone has an idea? Something like<br>
&gt; &gt;&nbsp; $scalebar = $map -&gt; scalebarobj();<br>
&gt; &gt;&nbsp; $scalebar = set(&quot;width&quot;, 200);<br>
&gt; <br>
&gt; Try this:<br>
&gt; <br>
&gt; $map-&gt;{'scalebar'}-&gt;set('width', 200);<br>
&gt; <br><br>
Does the Perl hash table notation ($map-&gt;{'scalebar'}-&gt;...) work
with<br>
PHP objects?&nbsp; I never tried it myself, but if the above doesn't
work<br>
then try:<br><br>
&nbsp; $map-&gt;scalebar-&gt;set('width', 200);<br><br>
-- <br>
------------------------------------------------------------<br>
&nbsp;Daniel
Morissette&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
morissette at dmsolutions.ca<br>
&nbsp;DM Solutions
Group&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<a href="http://www.dmsolutions.ca/" eudora="autourl">http://www.dmsolutions.ca/</a><br>
------------------------------------------------------------
</blockquote>
<x-sigsep><p></x-sigsep>
<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab>_______________________________________<br><br>
</font><font size=2><x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab><b>Stefan
Schwarzer<br>
</b><x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab>Consultant
on GEO<br><br>
<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab>UNEP/DEWA/GRID-Geneva<br>
<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab>Chemin des
Anemones 11<br>
<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab>CH - 1219
Chatelaine<br>
<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab>Switzerland<br><br>
<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab>Tel: (+41)
22.917.83.49<br>
<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab>Fax: (+41)
22.917.80.29<br><br>
<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab>Email:
stefan.schwarzer at grid.unep.ch<br>
<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab>Internet:
<a href="http://geodata.grid.unep.ch/" eudora="autourl">http://geodata.grid.unep.ch/</a><br>
</font><font size=3><x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab>_______________________________________</font></body>
</html>

--=====================_1205641651==.ALT--




More information about the mapserver-users mailing list