Map image created but won't display
Alan Hale
alan.hale at BTCLICK.COM
Fri Jun 15 14:00:50 PDT 2007
I've tried once before with this and had no response at all. I'm going
to try again because I have tried everything I can think of.
I have mapserv running from /cgi-bin/ within a virtual host on a Fedora
6 - based server managed via Plesk. Testing with a simple "Hello World"
application. Both map file (hello.map) and the initialisation/template
(hello.html) file are under /httpdocs/mapserver/ . Images to be written
to /httpdocs/mapserver/tmp/
Mapserv will write the images back to the /tmp/directory OK, and returns
the correct image_url to hello.html, so the html looks like this: <img
src="/tmp/Hello_World118193937715913.png" width=400 height=300 border
=0>
But the image does not display (a broken image icon appears).
If I paste the source into a new file and FTP it back up this will
display the image with no problem. I am completely baffled.
#This is the "Hello World" mapfile
NAME "Hello_World"
SIZE 400 300
IMAGECOLOR 249 245 186
IMAGETYPE png
EXTENT -1.00 -1.00 1.00 1.00
WEB
TEMPLATE
"/var/www/vhosts/bsbimaps.org.uk/httpdocs/mapserver/hello.html"
IMAGEPATH
"/var/www/vhosts/bsbimaps.org.uk/httpdocs/mapserver/tmp/"
IMAGEURL "/tmp/"
END
LAYER
STATUS default
TYPE point
FEATURE
POINTS 0.0 0.0 END
TEXT "Hello World - from bsbimaps"
END #end feature
CLASS
STYLE
COLOR 255 0 0
END
LABEL
TYPE bitmap
END
END
END
END
TEMPLATE
<html>
<head><title>Mapserver Hello World</title></head>
<body>
<form method = GET action ="/cgi-bin/mapserv">
<input type ="submit" value="Click Me">
<input type="hidden" name="map" value
="/var/www/vhosts/bsbimaps.org.uk/httpdocs/mapserver/hello.map"
<input type="hidden" name="map_web_imagepath" value
="/var/www/vhosts/bsbimaps.org.uk/httpdocs/mapserver/tmp/"
</form>
<img src="[img]" width=400 height=300 border =0>
</body>
</html>
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.472 / Virus Database: 269.8.16/849 - Release Date:
14/06/2007 12:44
More information about the MapServer-users
mailing list