-
Notifications
You must be signed in to change notification settings - Fork 5
/
itasca_adds_pan.html
148 lines (127 loc) · 7.9 KB
/
itasca_adds_pan.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
<!-- MapServer Template -->
<!DOCTYPE html>
<html>
<head>
<title>MapServer - Itasca Application</title>
<script language="javascript">
var pansize = 0.80;
function pan(direction) {
var x, y;
if (direction == 'n') {
x = ([mapwidth] - 1) / 2.0;
y = 0 - [mapheight] * pansize + [mapheight] / 2.0;
} else if (direction == 'nw') {
x = 0 - [mapwidth] * pansize + [mapwidth] / 2.0;
y = 0 - [mapheight] * pansize + [mapheight] / 2.0;
} else if (direction == 'ne') {
x = ([mapwidth] - 1) + [mapwidth] * pansize - [mapwidth] / 2.0;
y = 0 - [mapheight] * pansize + [mapheight] / 2.0;
} else if (direction == 's') {
x = ([mapwidth] - 1) / 2.0;
y = ([mapheight] - 1) + [mapheight] * pansize - [mapheight] / 2.0;
} else if (direction == 'sw') {
x = 0 - [mapwidth] * pansize + [mapwidth] / 2.0;
y = ([mapheight] - 1) + [mapheight] * pansize - [mapheight] / 2.0;
} else if (direction == 'se') {
x = ([mapwidth] - 1) + [mapwidth] * pansize - [mapwidth] / 2.0;
y = ([mapheight] - 1) + [mapheight] * pansize - [mapheight] / 2.0;
} else if (direction == 'e') {
x = ([mapwidth] - 1) + [mapwidth] * pansize - [mapwidth] / 2.0;
y = ([mapheight] - 1) / 2.0;
} else if (direction == 'w') {
x = 0 - [mapwidth] * pansize + [mapwidth] / 2.0;
y = ([mapheight] - 1) / 2.0;
}
document.mapserv.mode[0].checked = true; // force browse
document.mapserv.zoomdir[1].checked = true; // force pan
document.mapserv.imgxy.value = x + " " + y;
document.mapserv.submit();
}
</script>
</head>
<body bgcolor=#FFFFFF>
<center><h1>MapServer - Itasca 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="0" align="center" bgcolor="#666666">
<tr>
<td align="right" width="18"><a href="javascript:pan('nw')"><img src="[root]/graphics/nw.gif" width="18" height="18" border="0" alt="pan northwest"></a></td>
<td align="center"><a href="javascript:pan('n')"><img src="[root]/graphics/n.gif" width="23" height="18" border="0" alt="pan north"></a></td>
<td align="left" width="18"><a href="javascript:pan('ne')"><img src="[root]/graphics/ne.gif" width="18" height="18" border="0" alt="pan northeast"></a></td>
</tr>
<tr>
<td align="right" width="18"><a href="javascript:pan('w')"><img src="[root]/graphics/w.gif" width="18" height="23" border="0" alt="pan west"></a></td>
<td align="center"><INPUT type="image" name="img" src="[img]" width="[mapwidth]" height="[mapheight]" border="0" alt="this is the map"></td>
<td align="left" width="18"><a href="javascript:pan('e')"><img src="[root]/graphics/e.gif" width="18" height="23" border="0" alt="pan east"></a></td>
</tr>
<tr>
<td align="right" width="18"><a href="javascript:pan('sw')"><img src="[root]/graphics/sw.gif" width="18" height="18" border="0" alt="pan southwest"></a></td>
<td align="center"><a href="javascript:pan('s')"><img src="[root]/graphics/s.gif" width="23" height="18" border="0" alt="pan south"></a></td>
<td align="left" width="18"><a href="javascript:pan('se')"><img src="[root]/graphics/se.gif" width="18" height="18" border="0" alt="pan southeast"></a></td>
</tr>
<tr>
<td bgcolor="#666666" colspan="3">
<img align="right" title="scalebar (km)" alt="scalebar (km)" src="[program]?map=[map]&mapext=[minx]+[miny]+[maxx]+[maxy]&map_scalebar=UNITS+KILOMETERS&mode=scalebar">
<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=5>
<option value="airports" [airports_select]> Airports
<option value="cities" [cities_select]> Cities
<option value="ctybdpy2" [ctybdpy2_select]> County Boundary
<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" value="[map_web]">
</form>
<p><hr><p>
<a href="[root]/index.html">back to start</a>
<p>
<i>itasca_adds_pan.html</i>
</body>
</html>