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

Stefan Schwarzer stefan.schwarzer at grid.unep.ch
Wed Apr 16 09:31:55 EDT 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 &quot;0&quot; values. But I found
a slightly different way.<br><br>
<br>
[....]<br><br>
// draw legend<br>
$image_legend = $map -&gt; drawLegend();<br>
$url_legend = $image_legend -&gt; saveWebImage(MS_PNG, 1, 1, 
0);<br><br>
// calculate height<br>
<b>$legHeight = $image_legend -&gt; height;&nbsp; //----&gt; works
fine<br>
$legHeight = $map -&gt; legend -&gt; height; //-----&gt; does not
work<br><br>
<br><br>
</b><blockquote type=cite class=cite cite>Stefan Schwarzer wrote:<br>
&gt; <br>
&gt; I would like to access the height and width properties of the
legend<br>
&gt; with php/mapsrcipt. I read in this posting<br>
&gt;
<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>
&gt; that this wasn't possible yet. But as it dates from Sep 2001 I
wonder<br>
&gt; if this limitation has been overcome?<br>
&gt; <br><br>
Yes they are accessible using $map-&gt;legend-&gt;width and<br>
$map-&gt;legend-&gt;height.&nbsp; 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>
&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>

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




More information about the mapserver-users mailing list