[mapserver-users] oraclespatial query through CGI
Yu-Hsin Chen
ychen at yorktel.com
Thu Apr 18 10:18:54 PDT 2002
I'm running the mapserver 3.5 CGI version and HTML template on a Linux system.
I followed Rod's guidance of Feb 11 and put a javascript function called DoQuery in my HTML file to call a Perl program (Rod's original version calls a PHP program, I figured it should work with Perl).
Now my question is how do I specify when this DoQuery function is called. I'm still getting the error message of function not implemented when I execute the new HTML.
Yu-Hsin Chen
<html>
<head><title>GIS Capabilities</title>
<script language="javascript">
function DoQuery( url_query, x1, y1, x2, y2 )
{
size = imgsize.split( /\+/ );
ext = imgext.split( /\+/ );
nx = eval( size[0] ) - 1;
ny = eval( size[1] ) - 1;
minx = eval( ext[0] );
miny = eval( ext[1] );
maxx = eval( ext[2] );
maxy = eval( ext[3] );
qx1 = x1*(maxx - minx)/nx + minx;
qx2 = x2*(maxx - minx)/nx + minx;
qy1 = (ny - y1)*(maxy - miny)/ny + miny;
qy2 = (ny - y2)*(maxy - miny)/ny + miny;
document.location = 'http://localhost/cgi-bin/querymap.pl?qx1=' + qx1 + '&qy1=' + qy1 + '&qx2=' + qx2 + '&qy2=' + qy2;
}
</script>
</head>
<body bgcolor=#FFFFFF>
<center><h1>SSA IVT 289 Site Cut-Over Status</h1></center>
<hr>
<form method=GET action="/cgi-bin/mapserver/mapserv">
<center>
<table border=0 cellspacing=0 cellpadding=4 bgcolor="#000000">
<tr>
<td valign="top" align=center>
<table cellpadding="0" cellspacing="0" border="0">
<tr><td colspan="2"><INPUT NAME="img" TYPE="image" SRC="[img]" width=600 height=400 border=0></td></tr>
<tr>
<td> <font size=-1 face="arial,helvetica" color="#FFFFFF"><b>Powered by MapServer</b></font></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 Map"></center>
<p>
<input type="radio" name="mode" value="browse" checked> <b>Refresh Map</b><br>
<input type="radio" name="mode" value="query"> <b>Query Data</b><br>
<hr>
<p>
<input type=radio name=zoomdir value=1 [zoomdir_1_check]> Zoom In<br>
<input type=radio name=zoomdir value=0 [zoomdir_0_check]> Pan <br>
<input type=radio name=zoomdir value=-1 [zoomdir_-1_check]> Zoom Out<br>
<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>
</td></tr></table>
</td></tr>
</table>
</center>
<input type="hidden" name="imgxy" value="299.5 299.5">
<input type="hidden" name="imgext" value="[mapext]">
<input type="hidden" name="url_query" value="http://localhost/cgi-bin/querymap.pl">
<input type="hidden" name="map" value="/web/dvp/mapserver/ssa/usa.map">
<input type="hidden" name="savequery" value="true">
<input type="hidden" name="program" value="/cgi-bin/mapserver/mapserv">
<input type="hidden" name="map_web_imagepath" value="/web/dvp/tmp/">
<input type="hidden" name="map_web_imageurl" value="/tmp/">
</form>
<p><hr><p>
</body></html>
More information about the MapServer-users
mailing list