[Mapserver-users] width/height properties of legendobj with php

Stefan Schwarzer stefan.schwarzer at grid.unep.ch
Wed Apr 16 06:31:55 PDT 2003


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

Daniel,

thanks for the answer. Sorry, I guessed that the info indicated on the page 
means that the bug was resolved, but wasn't sure. And the problem using 
your suggested method I still get "0" values. But I found a slightly 
different way.


[....]

// draw legend
$image_legend = $map -> drawLegend();
$url_legend = $image_legend -> saveWebImage(MS_PNG, 1, 1, 0);

// calculate height
$legHeight = $image_legend -> height;  //----> works fine
$legHeight = $map -> legend -> height; //-----> does not work



>Stefan Schwarzer wrote:
> >
> > I would like to access the height and width properties of the legend
> > with php/mapsrcipt. I read in this posting
> > http://mapserver.gis.umn.edu/data2/wilma/mapserver-users/0109/msg00086.html
> > that this wasn't possible yet. But as it dates from Sep 2001 I wonder
> > if this limitation has been overcome?
> >
>
>Yes they are accessible using $map->legend->width and
>$map->legend->height.  They've been there since 2001-10-17 according to
>the bug report that was mentioned in the list message above.
>
>--
>------------------------------------------------------------
>  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/
         _______________________________________ 
--=====================_111329473==.ALT
Content-Type: text/html; charset="us-ascii"

<html>
<body>
<font size=3>Daniel,<br><br>
thanks for the answer. Sorry, I guessed that the info indicated on the
page means that the bug was resolved, but wasn't sure. And the problem
using your suggested method I still get "0" values. But I found
a slightly different way.<br><br>
<br>
[....]<br><br>
// draw legend<br>
$image_legend = $map -> drawLegend();<br>
$url_legend = $image_legend -> saveWebImage(MS_PNG, 1, 1, 
0);<br><br>
// calculate height<br>
<b>$legHeight = $image_legend -> height;  //----> works
fine<br>
$legHeight = $map -> legend -> height; //-----> does not
work<br><br>
<br><br>
</b><blockquote type=cite class=cite cite>Stefan Schwarzer wrote:<br>
> <br>
> I would like to access the height and width properties of the
legend<br>
> with php/mapsrcipt. I read in this posting<br>
>
<a href="http://mapserver.gis.umn.edu/data2/wilma/mapserver-users/0109/msg00086.html" eudora="autourl">http://mapserver.gis.umn.edu/data2/wilma/mapserver-users/0109/msg00086.html</a><br>
> that this wasn't possible yet. But as it dates from Sep 2001 I
wonder<br>
> if this limitation has been overcome?<br>
> <br><br>
Yes they are accessible using $map->legend->width and<br>
$map->legend->height.  They've been there since 2001-10-17
according to<br>
the bug report that was mentioned in the list message above.<br><br>
-- <br>
------------------------------------------------------------<br>
 Daniel
Morissette              
morissette at dmsolutions.ca<br>
 DM Solutions
Group             
<a href="http://www.dmsolutions.ca/" eudora="autourl">http://www.dmsolutions.ca/</a><br>
------------------------------------------------------------
</blockquote>
<x-sigsep><p></x-sigsep>
<x-tab>        </x-tab>_______________________________________<br><br>
</font><font size=2><x-tab>        </x-tab><b>Stefan
Schwarzer<br>
</b><x-tab>        </x-tab>Consultant
on GEO<br><br>
<x-tab>        </x-tab>UNEP/DEWA/GRID-Geneva<br>
<x-tab>        </x-tab>Chemin des
Anemones 11<br>
<x-tab>        </x-tab>CH - 1219
Chatelaine<br>
<x-tab>        </x-tab>Switzerland<br><br>
<x-tab>        </x-tab>Tel: (+41)
22.917.83.49<br>
<x-tab>        </x-tab>Fax: (+41)
22.917.80.29<br><br>
<x-tab>        </x-tab>Email:
stefan.schwarzer at grid.unep.ch<br>
<x-tab>        </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>        </x-tab>_______________________________________</font></body>
</html>

--=====================_111329473==.ALT--




More information about the MapServer-users mailing list