<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<title>Crop Districts of Saskatchewan</title>
<script language="javascript">
var areas = new array();
function areaobject(name, id) {
this.name = name;
this.id = id;
}
function showText(text) {
status = text;
}
function clearAreas() {
for(key in areas) {
areas[key] = null;
}
//update the selected areas div
var element = document.getElementById('selected_areas');
element.innerHTML = '';
//update themap
document.map.src = "http://localhost/cgi-bin/mapserv.exe?layer=cropdis&map=/ms4w/apps/ms101/htdocs/saskmap.map&mode=map&mapext=114000+5427477+788000+6067338&mapsize=400+400";
}
function selectArea(name, id) {
if(areas[name] && areas[name] != null) { // unset areas[name] = null;
} else {
areas[name] = new areaObject(name, id);
}
//compute a few things passing through the areas array
var ids = new Array();
var content = '';
for(key in areas) {
if(areas[key] !=null) {
content+= areas[key].name + " (" + areas[key].id + ")<br>";
ids.push(areas[key].id);
}
}
//update the map
document.map.src = "http://localhost/cgi-bin/mapserv.ext?layer=cropdis&map=/ms4w/apps/ms101/htdocs/saskmap.map&mode=map&mapext=114000+5427477+788000+6067338&mapsize=400+400&ids=" + ids.join(',');
}
</script>
</head>
<body bgcolor="#ffffff">
<br>
<font size=+2 face=arial,helvetica><b>Crop Districts of Saskatchewan</b></font>
<p>
<form method="GET" action="[program]">
<input type="hidden" name="map" value="[map]">
<input type="hidden" name="imgext" value="[mapext]">
<input type="hidden" name="imgxy" value="149.5 199.5">
<input type="hidden" name="program" value="[program]">
<input type="hidden" name="htmlroot" value="[htmlroot]">
<input type="hidden" name="map_web_imagepath" value="[map_web_imagepath]">
<input type="hidden" name="map_web_imageurl" value="[map_web_imageurl]">
<table border=0 cellpadding=5 width="600">
<tr>
<td colspan="2">This demo show the ability to search by crop districts and return a result!
<p>
</td>
</tr>
<tr>
<td align=center>
<input type="image" name="img" src="[img]" border="0" width="400" height="400">
<br>
<img src="[scalebar]">
</td>
<td valign=top>
<font size=+1 face=arial,helvetica><b>Map Controls</b></font>
<p>
<input type="radio" name="mode" value="query"> select crop district
<p>
Set your zoom option:<br>
<select name="zoom" size="1">
<option value="4" [zoom_4_select]> Go to Rural Municipalities
</select>
<input type="submit" value="Go!">
<p>
<font size=+1 face=arial,helvetica><b>Legend</b></font><br>
<img src="[legend]"><br><br><br><br>
<center><input type="image" name="ref" src="[ref]" border="0" width="100" height="100"></center>
</td>
</tr></table>
</form>
</body>
</html>