Example 1.9: Interactive Maps and the Browse Mode not working
SUBSCRIBE MAPSERVER-USERS zaidi f
faiza_nov at HOTMAIL.COM
Mon Jan 7 03:31:25 PST 2008
hi,
as i am new to the mapserver, and find it good for the pdf outputs. i have
installed the ms4w package and tutorial for mapserver version 5. i have tried
the tutorial as well, but getting some problem.
i have copied my mapfile and an html page on the
path "C:\ms4w\Apache\htdocs\chk" and got it running in the browser
as "http://localhost:82/chk/example1-9.html". but the problem is with browser
output. i m unable to see the image when the mode is set to browse. i have
followed the link
http://biometry.gis.umn.edu/cgi-bin/mapserv.exe?
map=/ms4w/apps/tutorial/htdocs/example1-9.map&layer=states&layer=modis
in the log file i am getting an error "[Mon Jan 07 10:39:28 2008] [error] [client
127.0.0.1] File does not exist: C:/ms4w/Apache/htdocs/chk/[img], referer:
http://localhost:82/chk/example1-9.html"
when i checked the tmp\ms_tmp\ i found no image there.
also when i clicked on the place of the image with the cross sign, i t gives an
error "msEvalRegex(): Regular expression error. String ([map]) failed expression
test."
my mapfile is:
MAP
NAME EX1.9_
IMAGETYPE PNG24
EXTENT 246033.25 53055.59765625 250754.625 57199.203125
SIZE 400 300
WEB
TEMPLATE 'C:/ms4w/Apache/htdocs/chk/example1-9.html'
IMAGEPATH 'c:/ms4w/tmp/ms_tmp/'
IMAGEURL 'c:/ms_tmp/'
END
# Start of LAYER DEFINITIONS --------------------------------------------
-
LAYER # States polygon layer begins here
NAME states
CONNECTIONTYPE postgis
CONNECTION "user=kk password=kk dbname=kk host=localhost port=5432"
DATA "geom from topographicarea"
TYPE POLYGON
STATUS OFF
CLASS
NAME "land"
EXPRESSION ('[theme]' = 'Land')
STYLE
COLOR 255 0 0
OUTLINECOLOR 255 0 0
END
END
END # States polygon layer ends here
# End of LAYER DEFINITIONS
END # end of mapfile
-------------------------------#
my html page is:
<html>
<head>
<title>MapServer 5.x Tutorial</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-
1">
<link type="text/css" rel="stylesheet" href="ms35.css" />
</head>
<body bgcolor="#FFFFFF" text="#000000">
<table align="center" width="680" border="0">
<tr>
<td>
<h3 align="center">
Example 1.9: Interactive Maps and the Browse Mode
</h3>
<div align="center">
<img border="1" src="/cgi-bin/mapserv.exe?
map=/ms4w/Apache/htdocs/chk/example1-9.map&layer=states&mode=map" />
</div>
<p align="left">The map above was created in "map" mode.
It is
a static map (it doesn't change when you click on it).
</p>
<!-- START OF MAPSERVER FORM -->
<form name="mapserv" method="GET" action="/cgi-bin/mapserv.exe">
<!-- HIDDEN MAPSERVER CGI VARIABLES -->
<input type="hidden" name="map" value="[map]">
<input type="hidden" name="imgext" value="[mapext]">
<input type="hidden" name="imgxy" value="[center]">
<input type="hidden" name="zoom" value="0">
<input type="hidden" name="layer" value="states">
<input type="hidden" name="mode" value="browse">
<div align="center">
<table border="1" cellpadding="0" cellspacing="0">
<tr>
<td>
<!-- THE INTERACTIVE, DYNAMICALLY CREATED MAP -->
<input type="image" name="img" src="[img]"
width="400" height="300">
</td>
</tr>
</table>
</div>
</form>
<!-- END OF MAPSERVER FORM -->
</table>
</body>
</html>
can you please tell where i am getting problem in the form section of my html
page. the static map image works fine. thanks for any help.
zaidi.
More information about the MapServer-users
mailing list