[Mapserver-users] no legend
Michael Schulz
mschulz at webgis.de
Thu Mar 18 05:19:32 PST 2004
Hi,
maybe the KEYSIZE (the size of the legend box for each class you have
defined) is too big (200x120 pixel)?
Cheers, Michael
Elisabeth Nolz schrieb:
> hi list.
>
> i have a "simple" problem: there ist no legend indicated. not even an
> error message. just an image with nothing in it. i can't imagine why. what
> am i doing wrong? i am grateful for each assistance.
>
> here is an extract of my mapfile (with only one layer):
>
> NAME TEST
> STATUS ON
> SIZE 300 300
> EXTENT 1100 340050 2000 339480
> UNITS METERS
> SHAPEPATH "data"
> IMAGECOLOR 255 255 255
> IMAGETYPE GIF
>
> WEB
> IMAGEPATH "c:\apache\htdocs\bla\tmp\"
> IMAGEURL "/bla/TMP/"
> END
>
> LEGEND
> STATUS ON
> IMAGECOLOR 255 255 255
> TRANSPARENT OFF
> OUTLINECOLOR 0 0 0
> KEYSIZE 200 120
> POSITION LR
> LABEL
> TYPE BITMAP
> SIZE MEDIUM
> COLOR 160 220 255
> END
> END
>
> LAYER
> NAME "blabla"
> DATA "blabla"
> STATUS ON
> TYPE POLYGON
> CLASSITEM "blabla"
> CLASS
> EXPRESSION /./
> OUTLINECOLOR 0 0 0
> COLOR 255 255 255
> END
> END
>
>
> and an extract of my php-file:
>
> <?php
> ...
> $map=ms_newMapObj($map_path.$map_file);
> $image=$map->draw();
> $image_url=$image->saveWebImage(MS_GIF,1,1,0);
> $image_legend=$map->drawLegend();
> $image_legend_url=$image_legend->saveWebImage(MS_GIF,1,1,0);
> ...
> ?>
>
> <html>
> ...
> <td valign="top">
> <table>
> <tr><td>
> <font size=+2><b>Legende</b></font><br>
> <img src="<?php echo $image_legend_url?>">
> </td></tr>
> </table>
> </td>
> ...
> </html>
>
>
> thx, elisabeth.
> _______________________________________________
> Mapserver-users mailing list
> Mapserver-users at lists.gis.umn.edu
> http://lists.gis.umn.edu/mailman/listinfo/mapserver-users
>
--
-----------------------------------------------------------
Michael Schulz in medias res
Dipl.-Geologe Gesellschaft für
Informationstechnologie mbH
In den Weihermatten 66
79108 Freiburg
0761 55695-95 (Fax 96)
mschulz at webgis.de www.webgis.de/www.zopecms.de
More information about the MapServer-users
mailing list