[Mapserver-users] no legend
Elisabeth Nolz
e9625730 at student.tuwien.ac.at
Thu Mar 18 04:20:36 PST 2004
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.
More information about the MapServer-users
mailing list