<style type="text/css">
        <!--
                @page { margin: 0.79in }
                P { margin-bottom: 0.08in }
                A:link { so-language: zxx }
        -->
        </style>


<p style="margin-bottom:0in">Hello, <br>respected everyone,<br></p><p style="margin-bottom:0in">I have a problem when using Mapserver. 
I just using Maperver to rend an shapefile on ubuntu 12.04. but the expect image is not correctly showing, i think there maybe some problem with my mapfile set, especially with IMAGEURL define?<br></p>
<p style="margin-bottom:0in"> 
</p>
<p style="margin-bottom:0in">I use a guide in the link
:<a href="http://www.gistutor.com/mapserver/3-beginner-mapserver-tutorials/7-how-to-generate-a-simple-map-using-mapserver-and-a-shapefile.html">http://www.gistutor.com/mapserver/3-beginner-mapserver-tutorials/7-how-to-generate-a-simple-map-using-mapserver-and-a-shapefile.html</a></p>

<p style="margin-bottom:0in"><br>
</p>
<p style="margin-bottom:0in">I assign the mapfile &
template.html&start.html in my www DIR, 
</p>
<p style="margin-bottom:0in">which is like this:</p>
<p style="margin-bottom:0in">mapfiel.map:</p>
<p style="margin-bottom:0in">MAP
</p>
<p style="margin-bottom:0in">NAME parcels_map
</p>
<p style="margin-bottom:0in">STATUS ON
</p>
<p style="margin-bottom:0in">SIZE 420 300
</p>
<p style="margin-bottom:0in">EXTENT 489885 5450946 490904 5451637
</p>
<p style="margin-bottom:0in">UNITS METERS
</p>
<p style="margin-bottom:0in">SHAPEPATH "shapefiles"
</p>
<p style="margin-bottom:0in">IMAGECOLOR 255 255 255
</p>
<p style="margin-bottom:0in"> 
</p>
<p style="margin-bottom:0in">WEB
</p>
<p style="margin-bottom:0in">TEMPLATE "template.html"
</p>
<p style="margin-bottom:0in">IMAGEPATH "/var/www/output/"
</p>
<p style="margin-bottom:0in">IMAGEURL "/output/"
</p>
<p style="margin-bottom:0in">END
</p>
<p style="margin-bottom:0in"> 
</p>
<p style="margin-bottom:0in"> 
</p>
<p style="margin-bottom:0in">LAYER
</p>
<p style="margin-bottom:0in">NAME "parcel_boundaries"
</p>
<p style="margin-bottom:0in">DATA parcels
</p>
<p style="margin-bottom:0in">STATUS DEFAULT
</p>
<p style="margin-bottom:0in">TYPE POLYGON
</p>
<p style="margin-bottom:0in">CLASS
</p>
<p style="margin-bottom:0in">NAME "parcels_color"
</p>
<p style="margin-bottom:0in">COLOR 255 215 0
</p>
<p style="margin-bottom:0in">END
</p>
<p style="margin-bottom:0in">END
</p>
<p style="margin-bottom:0in"> 
</p>
<p style="margin-bottom:0in"># end of map file
</p>
<p style="margin-bottom:0in">END</p>
<p style="margin-bottom:0in"><br>
</p>
<p style="margin-bottom:0in"><br>
</p>
<p style="margin-bottom:0in">starrtmap.html:</p>
<p style="margin-bottom:0in"><html>
</p>
<p style="margin-bottom:0in"><head><title>Creating a
simple image using Mapserver and a Shapefile</title></head>
</p>
<p style="margin-bottom:0in"><body bgcolor="#FFFFFF">
</p>
<p style="margin-bottom:0in"><h2>Creating a simple image using
Mapserver and a Shapefile</h2>
</p>
<p style="margin-bottom:0in"><p><hr><p>
</p>
<p style="margin-bottom:0in">This page simply contains a link which
sends a set of instructions to the Mapserver application using a
mapfile.<br />
</p>
<p style="margin-bottom:0in">The information stored within the
mapfile tells the Mapserver application how to draw the map.<p>
</p>
<p style="margin-bottom:0in"><!-- The following link sends the
local file structure path of the mapfile to the web location of the
mapserver executable file  -->
</p>
<p style="margin-bottom:0in"><A
HREF="<a href="http://localhost/cgi-bin/mapserv?map=/var/www/mapfile.map">http://localhost/cgi-bin/mapserv?map=/var/www/mapfile.map</a>">
</p>
<p style="margin-bottom:0in">Click on this link</A> to view a
map generated using a Shapefile.
</p>
<p style="margin-bottom:0in"><p><hr><p>
</p>
<p style="margin-bottom:0in"> 
</p>
<p style="margin-bottom:0in"></body>
</p>
<p style="margin-bottom:0in"></html></p>
<p style="margin-bottom:0in"><br>
</p>
<p style="margin-bottom:0in">template.html:</p>
<p style="margin-bottom:0in"><!-- MapServer Template -->
</p>
<p style="margin-bottom:0in"><html>
</p>
<p style="margin-bottom:0in"><head><title>Simple
Mapserver Template HTML Document</title></head>
</p>
<p style="margin-bottom:0in"><body bgcolor=#AAAAAA>
</p>
<p style="margin-bottom:0in"><h2>The image below was
illustrated based on the instructions sent in the mapfile.</h2>
</p>
<p style="margin-bottom:0in"><!-- When using Mapserver with a
template, the Mapserver application looks for the [img] tag within
the template document to place the map -->
</p>
<p style="margin-bottom:0in"><img src="/[img]"
border=1>
</p>
<p style="margin-bottom:0in"></body>
</p>
<p style="margin-bottom:0in"></html></p>
<p style="margin-bottom:0in"><br>
</p>
<p style="margin-bottom:0in">when I run the
“<a href="http://localhost/cgi-bin/mapserv?map=/var/www/mapfile.map">http://localhost/cgi-bin/mapserv?map=/var/www/mapfile.map</a>”
in my address colum. 
</p>
<p style="margin-bottom:0in">The expect map is not shown. 
</p>
<p style="margin-bottom:0in"><br>
</p>
<p style="margin-bottom:0in">The page is showing content of
template.html expectly, but there is only a image icon , but with no
picture. And the status bar in the firefox brower is showing :
conecting to output ..</p>
<p style="margin-bottom:0in"><br>
</p>
<p style="margin-bottom:0in">I notice that in the var/www/output
DIR, there have been some png file generated. And is the png
containing the polygon in the shapefile.  Every time when I click the
“<a href="http://localhost/cgi-bin/mapserv?map=/var/www/mapfile.map">http://localhost/cgi-bin/mapserv?map=/var/www/mapfile.map</a>”
link,  a new png file is generated in output DIR. 
</p>
<p style="margin-bottom:0in"><br>
</p>

<p style="margin-bottom:0in">I want to know if the IMAGEURL in the
mapfile is set wrongly? Why the png is genrated correctly but not
showing in the browser? Any one can help me?</p>

<br clear="all"><br>-- <br><div style="text-align:left"><span style="text-align:-webkit-auto">Yang Li</span><div>GIS Developer</div><div>P.R.China</div><div><br></div></div><br>