my app can not find template
Joseph Norris
sirronj at PACBELL.NET
Fri Nov 19 13:29:15 PST 2004
Ethan,
The HTML below shows what is being produced. However when I click on a
polygon I am still getting the no template found error. I have tried
several different ways - putting in absolute path, putting in dummy, taking
out the map_web_template field completely and still I get the error. Please
look and see if you something that I do not.
Here is what I am producing:
<html>
<head>
<title>MapServer - CS CGI Application</title>
</head>
<body bgcolor="#ffffff">
<!-- map_template.html -->
<center><h1>MapServer - CS CGI Application</h1></center>
<hr>
<form method="GET" action="/cgi-bin/teacher/makmap.cgi"
name="mapserv_select">
<center>
<table border="0" cellspacing="0" cellpadding="4">
<tr>
<td>
Teacher Type: <SELECT NAME="type">
<OPTION VALUE="type1" SELECTED>First Grade Teacher</option>
<OPTION VALUE="type2" >Second Grade Teacher</option>
<OPTION VALUE="type3" >Third Grade Teacher</option>
<OPTION VALUE="none" ></option>
</SELECT>
<input type="submit" value="Submit">
<input type="hidden" name="action" value="submit">
</form>
<form method="GET" action="/cgi-bin/mapserv" name="mapserv">
<input type="hidden" name="zoomsize" value="2">
<input type="hidden" name="zoomdir" value="1">
<input type="hidden" name="zoom" value="2">
<input type="hidden" name="map"
value="/usr/local/apache/htdocs/mco.communityservers.com/htdocs/tmp/filetYDM
Ik.map">
<input type="hidden" name="map_web_imagepath"
value="/usr/local/apache/htdocs/mco.communityservers.com/htdocs/maps/tmp/fil
eFBJuZF.gif">
<input type="hidden" name="map_web_imageurl" value="/maps/tmp">
<input type="hidden" name="map_web_template"
value="/usr/local/apache/htdocs/mco.communityservers.com/htdocs/maps/teacher
/templates/map_template.html">
<input type="hidden" name="root" value="/maps/teacher";
></td>
</tr>
<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="/maps/tmp/fileFBJuZF.gif" width="600" height="600" border="0" alt="this
is the map">
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>
#Joseph Norris (Perl - what else is there?/Linux/CGI/Mysql) print @c=map chr
$_+100,(6,17,15,16,-68,-3,10,11,16,4,1,14,-68,12,1,14,8,-68,4,-3,-1,7,1,14,-
68,-26,11,15,1,12,4,-68,-22,11,14,14,5,15,-90);
-----Original Message-----
From: UMN MapServer Users List [mailto:MAPSERVER-USERS at lists.umn.edu]On
Behalf Of Ethan Alpert
Sent: Friday, November 19, 2004 12:56 PM
To: MAPSERVER-USERS at lists.umn.edu
Subject: Re: [UMN_MAPSERVER-USERS] my app can not find template
I think all you're missing is a zoomdir parameter to tell mapserv which
direction to apply the zoom size.
-e
-----Original Message-----
From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On
Behalf Of Joseph Norris
Sent: Friday, November 19, 2004 1:40 PM
To: MAPSERVER-USERS at LISTS.UMN.EDU
Subject: Re: [UMN_MAPSERVER-USERS] my app can not find template
Thanks Ethan,
The whole reason for going down this route is that I need the zoom
feature in my map an I though that all add to was pass zoomsize to
mapserver - that appears to be what is being done in the workshop demo.
Am I wrong?
#Joseph Norris (Perl - what else is there?/Linux/CGI/Mysql) print @c=map
chr
$_+100,(6,17,15,16,-68,-3,10,11,16,4,1,14,-68,12,1,14,8,-68,4,-3,-1,7,1,
14,-
68,-26,11,15,1,12,4,-68,-22,11,14,14,5,15,-90);
-----Original Message-----
From: UMN MapServer Users List [mailto:MAPSERVER-USERS at lists.umn.edu]On
Behalf Of Ethan Alpert
Sent: Friday, November 19, 2004 8:29 AM
To: MAPSERVER-USERS at lists.umn.edu
Subject: Re: [UMN_MAPSERVER-USERS] my app can not find template
In this case you don't appear to need a TEMPLATE. I'm not sure but I
think you can put the string "dummy" into your template line. The
TEMPLATE option is really for calls where mode=browse and you only pass
the mapfile name to the mapserv executable.
-e
-----Original Message-----
From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On
Behalf Of Joseph Norris
Sent: Thursday, November 18, 2004 5:44 PM
To: MAPSERVER-USERS at LISTS.UMN.EDU
Subject: Re: [UMN_MAPSERVER-USERS] my app can not find template
Ok - here is what I have.
I have a perl cgi that builds my primary page, builds the map file and
uses the perl api to build the map image, then displays the page. In
the initial page I have all of the hidden fields that will direct that
are to be read by the mapserver to allow me to zoom into different
polygons on my California zip map ( each polygon representing a zip ).
The cgi produces the following html:
<html>
<head>
<title>MapServer - CS CGI Application</title>
</head>
<body bgcolor="#ffffff">
<!-- map_template.html -->
<center><h1>MapServer - CS CGI Application</h1></center>
<hr>
<form method="GET" action="/cgi-bin/teacher/makmap.cgi"
name="mapserv_select">
<center>
<table border="0" cellspacing="0" cellpadding="4">
<tr>
<td>
Teacher Type: <SELECT NAME="type">
<OPTION VALUE="type1" >First Grade Teacher</option>
<OPTION VALUE="type2" >Second Grade Teacher</option>
<OPTION VALUE="type3" >Third Grade Teacher</option>
<OPTION VALUE="none" SELECTED></option>
</SELECT>
<input type="submit" value="Submit">
<input type="hidden" name="action" value="submit">
</form>
<form method="GET" action="/cgi-bin/mapserv" name="mapserv"> <input
type="hidden" name="zoomsize" value=2> <input type="hidden" name="map"
value="/usr/local/apache/htdocs/mco.communityservers.com/htdocs/tmp/file
tRBR
Uk.map">
<input type="hidden" name="map_web_imagepath"
value="/usr/local/apache/htdocs/mco.communityservers.com/htdocs/maps/tmp
/fil
eWHBLVG.gif">
<input type="hidden" name="map_web_template"
value="/usr/local/apache/htdocs/mco.communityservers.com/htdocs/maps/tea
cher
/templates/map_template.html">
<input type="hidden" name="map_web_imageurl" value="/maps/tmp"> <input
type="hidden" name="root" value="/maps/teacher";
></td>
</tr>
<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="/maps/tmp/fileWHBLVG.gif" width="600" height="600" border="0"
alt="this is the map">
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>
The html consists of two forms one for selection of the criteria which
rebuilds the map just fine. The second for looking at the polygons. My
map file that is produced appears as follows on the initial display of
the map:
MAP
NAME CalMap
STATUS ON
EXTENT 5890870.385 -192053.200 8943310.847 3226086.749
IMAGETYPE GIF
SIZE 600 600
SHAPEPATH
"/usr/local/apache/htdocs/mco.communityservers.com/htdocs/maps/teacher/t
data
"
IMAGECOLOR 255 255 255
SYMBOL
NAME 'circle'
TYPE ELLIPSE
POINTS 1 1 END
FILLED TRUE
END
LAYER
NAME "cal_zp_st"
TYPE POLYGON
DATA "cal_zp_st"
STATUS DEFAULT
CLASSITEM "ZCTA"
CLASS
EXPRESSION /./
OUTLINECOLOR 204 204 204
END
END
END # end map from header
And after selection of specific criteria:
MAP
NAME CalMap
STATUS ON
EXTENT 5890870.385 -192053.200 8943310.847 3226086.749
IMAGETYPE GIF
SIZE 600 600
SHAPEPATH
"/usr/local/apache/htdocs/mco.communityservers.com/htdocs/maps/teacher/t
data
"
IMAGECOLOR 255 255 255
SYMBOL
NAME 'circle'
TYPE ELLIPSE
POINTS 1 1 END
FILLED TRUE
END
LAYER
NAME "cal_zp_st"
TYPE POLYGON
DATA "cal_zp_st"
STATUS DEFAULT
CLASSITEM "ZCTA"
CLASS
EXPRESSION
/94087|90408|94107|95118|94530|94596|90037|91016|92024|94954|93901|92503
/
STYLE
SYMBOL 'circle'
SIZE 2
COLOR 255 102 102
END
END
CLASS
EXPRESSION /./
OUTLINECOLOR 204 204 204
END
END
END # end map from header
My error condition comes about when I try to click on one of the
polygons in the map.
#Joseph Norris (Perl - what else is there?/Linux/CGI/Mysql) print @c=map
chr
$_+100,(6,17,15,16,-68,-3,10,11,16,4,1,14,-68,12,1,14,8,-68,4,-3,-1,7,1,
14,-
68,-26,11,15,1,12,4,-68,-22,11,14,14,5,15,-90);
-----Original Message-----
From: UMN MapServer Users List [mailto:MAPSERVER-USERS at lists.umn.edu]On
Behalf Of Ryan, Adam
Sent: Thursday, November 18, 2004 3:02 PM
To: MAPSERVER-USERS at lists.umn.edu
Subject: Re: [UMN_MAPSERVER-USERS] my app can not find template
> -----Original Message-----
> From: Joseph Norris [mailto:sirronj at PACBELL.NET]
> Sent: Thursday, November 18, 2004 2:25 PM
> To: MAPSERVER-USERS at LISTS.UMN.EDU
> Subject: [UMN_MAPSERVER-USERS] my app can not find template
>
>
> Hello,
>
> I am getting this message:
>
> mapserv(): Web application error. No template provided
>
> I have a hidden field <input type="hidden" name="map_web_template"
> value=" this I am not sure of ">
>
> Should my hidden field be the root relative or absolute path?
>
> No matter what I try my app is not finding my template.
>
> Thanks ahead of time.
>
>
> #Joseph Norris (Perl - what else is there?/Linux/CGI/Mysql) print
> @c=map chr
> $_+100,(6,17,15,16,-68,-3,10,11,16,4,1,14,-68,12,1,14,8,-68,4,
> -3,-1,7,1,14,- 68,-26,11,15,1,12,4,-68,-22,11,14,14,5,15,-90);
>
Joseph,
Just want to make sure your setting the value to a file, not just a
path, and not a url. Give us the examples that you've used.
Adam
More information about the MapServer-users
mailing list