[Mapserver-users] Blank or no image returned
David Fawcett
David.Fawcett at state.mn.us
Mon Jun 7 09:05:37 PDT 2004
Andrew,
It doesn't look like you have a reference object in your Map file. Add
one and I am guessing that will solve your issue.
David.
>>> "Andrew Rich" <devel at itdownunder.com.au> 6/4/2004 6:41:03 PM >>>
Hi All
Additional information I just discovered in the httpd error.log and
comparing to the tmp dir
3 images are created but it appears 1 is not.
-rw-r--r-- 1 apache apache 125 Jun 5 09:50
DEMO108639305823136.png
-rw-r--r-- 1 apache apache 83 Jun 5 09:50
DEMOleg108639305823136.png
-rw-r--r-- 1 apache apache 358 Jun 5 09:50
DEMOsb108639305823136.png
There is no DEMOref108639305823136.png file
So any idea now?
Thank you
Andrew Rich
Maps Downunder
Hi All
I have Mapserv 4.2 installed and works with Itasca demo.
I am now modifying the Itasca demo and using a image of the world in
TOPO8.TIF
Tyler has given me a .map file which I am adjusting to the paths of my
mapserv server.
When loading the Initialize file the renamed Itasca demo for shows
then
select the basic application. The normal Itasca screen shows but the
box is just the color set in IMAGECOLOR 100 100 255. It was 255 255
255
which was white but I changed to this blue for testing.
The scale bar in the lower left corner is in Kilometres and adjusts on
Zoom In and Out.
I have included a lot of information below but I need assistance to
move
on I think.
I saw in a previous post that it may be related to the projection but
my
knowledge of these topics is very limited.
Thank you for any assistance.
Andrew Rich
Maps Downunder
==== mapserv40 -v ====
MapServer version 4.2.0 OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP
SUPPORTS=PROJ
SUPPORTS=FREETYPE SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT
SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT INPUT=EPPL7 INPUT=OGR
INPUT=GDAL
INPUT=SHAPEFILE
==== ldd /var/www/cgi-bin/mapserv40 ====
libgd.so.2 => /usr/local/lib/libgd.so.2 (0x4002b000)
libjpeg.so.62 => /usr/lib/libjpeg.so.62 (0x40064000)
libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0x40082000)
libpng.so.3 => /usr/local/lib/libpng.so.3 (0x400c1000)
libproj.so.0 => /usr/local/lib/libproj.so.0 (0x400ee000)
libgdal.so.1 => /usr/local/lib/libgdal.so.1 (0x40121000)
libcurl.so.3 => /usr/local/lib/libcurl.so.3 (0x40417000)
libdl.so.2 => /lib/libdl.so.2 (0x40444000)
libm.so.6 => /lib/i686/libm.so.6 (0x40447000)
libc.so.6 => /lib/i686/libc.so.6 (0x42000000)
libpthread.so.0 => /lib/i686/libpthread.so.0 (0x40469000)
libXpm.so.4 => /usr/X11R6/lib/libXpm.so.4 (0x4047d000)
libX11.so.6 => /usr/X11R6/lib/libX11.so.6 (0x4048b000)
libpng12.so.0 => /usr/local/lib/libpng12.so.0 (0x40561000)
libz.so.1 => /usr/lib/libz.so.1 (0x4058e000)
libodbc.so.1 => /usr/lib/libodbc.so.1 (0x4059c000)
libungif.so.4 => /usr/lib/libungif.so.4 (0x405f9000)
libstdc++-libc6.2-2.so.3 => /usr/lib/libstdc++-libc6.2-2.so.3
(0x40601000)
libssl.so.2 => /lib/libssl.so.2 (0x40644000)
libcrypto.so.2 => /lib/libcrypto.so.2 (0x40672000)
/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
==== /etc/ld.so.conf ====
/usr/kerberos/lib
/usr/X11R6/lib
/usr/lib/qt2/lib
/usr/lib/mysql
/usr/lib/qt-3.0.5/lib
/usr/lib/sane
/usr/local/lib
/usr/lib/python1.5/site-packages
==== MAP FILE ====
#
# Start of map file
#
NAME DEMO
STATUS ON
SIZE 600 400
EXTENT -180 -90 180 90 # Whole world
UNITS DD
SHAPEPATH "data"
IMAGECOLOR 100 100 255
#FONTSET "/usr/src/mapserver-4.2.0/tests/fonts.txt"
CONFIG GDAL_DATA "data"
IMAGETYPE PNG
# OUTPUTFORMAT
# NAME "gif"
# MIMETYPE "image/gif"
# DRIVER "GD/GIF"
# EXTENSION "gif"
# IMAGEMODE PC256
# TRANSPARENT FALSE
# END
#
# Projection definition, consult the PROJ.4 documentation for
parameter
discussi
#
PROJECTION
"init=epsg:4326"
END
#
# Start of web interface definition
#
WEB
#HEADER demo_header.html
TEMPLATE giofinder_basic.html
#FOOTER demo_footer.html
IMAGEPATH "/var/www/html/maps/giofinder/tmp"
IMAGEURL "/giofinder/tmp/"
END
#
# Start of reference map
#
#
# Start of legend
#
LEGEND
KEYSIZE 18 12
LABEL
TYPE BITMAP
SIZE MEDIUM
COLOR 0 0 89
END
STATUS ON
#
# Start of map file
#
NAME DEMO
STATUS ON
SIZE 600 400
EXTENT -180 -90 180 90 # Whole world
UNITS DD
SHAPEPATH "data"
IMAGECOLOR 100 100 255
#FONTSET "/usr/src/mapserver-4.2.0/tests/fonts.txt"
CONFIG GDAL_DATA "data"
IMAGETYPE PNG
# OUTPUTFORMAT
# NAME "gif"
# MIMETYPE "image/gif"
# DRIVER "GD/GIF"
# EXTENSION "gif"
# IMAGEMODE PC256
# TRANSPARENT FALSE
# END
#
# Projection definition, consult the PROJ.4 documentation for
parameter
discussi
#
PROJECTION
"init=epsg:4326"
END
#
# Start of web interface definition
#
WEB
#HEADER demo_header.html
TEMPLATE giofinder_basic.html
#FOOTER demo_footer.html
IMAGEPATH "/var/www/html/maps/giofinder/tmp"
IMAGEURL "/giofinder/tmp/"
END
#
# Start of reference map
#
#
# Start of legend
#
LEGEND
KEYSIZE 18 12
LABEL
TYPE BITMAP
SIZE MEDIUM
COLOR 0 0 89
END
STATUS ON
END
#
# Start of scalebar
#
SCALEBAR
IMAGECOLOR 255 255 255
LABEL
COLOR 0 0 0
SIZE small
END
STYLE 1
SIZE 250 4
COLOR 0 0 0
UNITS KILOMETERS
INTERVALS 5
TRANSPARENT FALSE
STATUS TRUE
END
#
# Start of symbol definitions
#
SYMBOL
NAME 'circle'
TYPE ellipse
FILLED TRUE
POINTS 1 1 END
END
#
# Start of layer definitions
#
########## RASTER ##############
LAYER
NAME topo8
TYPE RASTER
DATA topo8.tif
STATUS OFF
PROJECTION
"proj=latlong"
"ellps=WGS84" # Geographic
END
END
END # Map File
==== INITIALIZE FILE ====
<html>
<head>
<title>Maps Downunder GioFinder Application</title>
<script language="javascript">
function submit_form() {
var template =
document.demo.map_web_template.options[document.demo.map_web_template.se
lectedIndex].value;
if(template.indexOf("frame") != -1) document.demo.action =
"frames.html";
if(template.indexOf("dhtml") != -1) document.demo.action =
"frames_dhtml.html";
<html>
<head>
<title>Maps Downunder GioFinder Application</title>
<script language="javascript">
function submit_form() {
var template =
document.demo.map_web_template.options[document.demo.map_web_template.se
lectedIndex].value;
if(template.indexOf("frame") != -1) document.demo.action =
"frames.html";
if(template.indexOf("dhtml") != -1) document.demo.action =
"frames_dhtml.html";
}
</script>
<script language="javascript">
function submit_form() {
var template =
document.demo.map_web_template.options[document.demo.map_web_template.se
lectedIndex].value;
if(template.indexOf("frame") != -1) document.demo.action =
"frames.html";
if(template.indexOf("dhtml") != -1) document.demo.action =
"frames_dhtml.html";
}
</script>
</head>
<body bgcolor="#FFFFFF">
<center><h2>Maps Downunder GioFinder Application</h2></center>
<p><hr><p>
This demonstration application will take you through various
levels
of complexity. Starting with a basic application that
allows a user to pan/zoom and change layers we add:
<ul>
<li> dynamically configured scalebars
<li> javascript-based panning
<li> query results to a frame
<li> and finally, a DHTML rubber-band zoom/query capabilty
</ul>
<!-- EDIT THE FORM ACTION -->
<form name="demo" method="GET" action="/cgi-bin/mapserv40"
onSubmit="submit_form()">
<!--
<input type="hidden" name="layer" value="contours">
<input type="hidden" name="layer" value="dlgstln2">
-->
<input type="hidden" name="zoomsize" value=2>
<!-- EDIT THESE HIDDEN VARIABLES -->
<input type="hidden" name="map"
value="/var/www/html/maps/giofinder/world.map">
<input type="hidden" name="program" value="/cgi-bin/mapserv40">
<input type="hidden" name="root" value="/giofinder">
<input type="hidden" name="map_web_imagepath"
value="/var/www/html/maps/giofinder/tmp/">
<input type="hidden" name="map_web_imageurl"
value="/giofinder/tmp/">
<select name="map_web_template" size="1">
<option value="giofinder_basic.html"> Basic Application
<option value="giofinder_adds_scalebar.html"> --
Adds second scalebar
<option value="giofinder_adds_pan.html"> -- Adds
pan
controls
<option value="giofinder_adds_frames.html"> --
Adds
frames
<option value="giofinder_adds_dhtml.html"> -- Adds
dhtml rubber-band box
</select>
<input type="submit" value="Initialize"></center>
</form>
<p><hr><p>
</body>
</html>
==== TEMPLATE HTML ====
<html>
<head>
<title>Maps Downunder GioFinder Application</title>
<script language="javascript">
function submit_form() {
var template =
document.demo.map_web_template.options[document.demo.map_web_template.se
lectedIndex].value;
if(template.indexOf("frame") != -1) document.demo.action =
"frames.html";
if(template.indexOf("dhtml") != -1) document.demo.action =
"frames_dhtml.html";
<html>
<head>
<title>Maps Downunder GioFinder Application</title>
<script language="javascript">
function submit_form() {
var template =
document.demo.map_web_template.options[document.demo.map_web_template.se
lectedIndex].value;
if(template.indexOf("frame") != -1) document.demo.action =
"frames.html";
if(template.indexOf("dhtml") != -1) document.demo.action =
"frames_dhtml.html";
}
</script>
<script language="javascript">
function submit_form() {
var template =
document.demo.map_web_template.options[document.demo.map_web_template.se
lectedIndex].value;
if(template.indexOf("frame") != -1) document.demo.action =
"frames.html";
if(template.indexOf("dhtml") != -1) document.demo.action =
"frames_dhtml.html";
}
</script>
<html>
<head>
<html>
<head>
<title>Maps Downunder - GioFinder Application</title>
</head>
<body bgcolor="#ffffff">
<center><h1>Maps Downunder - GioFinder Application</h1></center>
<hr>
<form method="GET" action="[program]" name="mapserv">
<center>
<table border="0" cellspacing="0" cellpadding="4">
<tr>
<td valign="top" align="center">
<table width="390" border="0" cellspacing="0" cellpadding="4"
align="center" bgcolor="#666666">
<tr>
<td align="center"><input type="image" name="img" src="[img]"
width="[mapwidth]" height="[mapheight]" border="0" alt="this is the
map"></td>
</tr>
<tr><td bgcolor="#666666">
<img title="scalebar (mi)" alt="scalebar (mi)" src="[scalebar]">
</td></tr>
</table>
</td>
<td valign="top" bgcolor="#ffffff">
<table cellpadding="5" cellspacing="0" border="0" bgcolor="#ffffff">
<tr><td>
<center><input type="submit" value="Refresh/Query"></center>
<p>
<input type="radio" name="mode" value="browse" checked>
<b>Browse
map</b><br>
<input type="radio" name="mode" value="query"> <b>Query
feature</b><br>
<input type="radio" name="mode" value="nquery"> <b>Query
multiple
features</b>
<hr>
<p>
<b>Select Layers to Display: </b><br>
<select multiple name="layer" size=3>
<option value="contours" [contours_select]> Contours
<option value="waterbodies" [waterbodies_select]> Lakes &
Rivers
<!-- <option value="lakespy2" [lakespy2_select]> Lakes & Rivers
<option value="dlgstln2" [dlgstln2_select]> Streams
<option value="roads" [roads_select]> Roads
<option value="twprgpy3" [twprgpy3_select]> Townships
<option value="drgs" [drgs_select]> USGS 1:250,000 Quads
-->
</select>
<p>
Zoom In <input type=radio name=zoomdir value=1
[zoomdir_1_check]>
Pan <input type=radio name=zoomdir value=0 [zoomdir_0_check]>
Zoom Out <input type=radio name=zoomdir value=-1
[zoomdir_-1_check]>
<p>
Zoom Size <input type=text name=zoomsize size=4
value=[zoomsize]>
<p>
<font size=+1><b>Legend</b></font><br><hr>
<img src="[legend]"><hr>
<p>
<center><input name="ref" type="image" src="[ref]"
border="0"></center>
</td></tr></table>
</td></tr>
</table>
</center>
<input type="hidden" name="imgxy" value="[center]">
<input type="hidden" name="imgext" value="[mapext]">
<input type="hidden" name="map" value="[map]">
<input type="hidden" name="root" value="[root]">
<input type="hidden" name="savequery" value="true">
<input type="hidden" name="program" value="[program]">
<input type="hidden" name="map_web_imagepath"
value="[map_web_imagepath]">
<input type="hidden" name="map_web_imageurl"
value="[map_web_imageurl]">
<input type="hidden" name="map_web_template"
value="[map_web_template]">
</form>
<p><hr><p>
<a href="[root]/index.html">back to start</a><p>
<i>[map_web_template]</i>
</body></html>
More information about the MapServer-users
mailing list