wms.php
2.87 KB
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
<HTML>
<HEAD>
<TITLE>WMS</TITLE>
<LINK REL="stylesheet" TYPE="text/css" HREF="wms_style.css">
<SCRIPT LANGUAGE='JavaScript'>
function doSetup() {
//
// Initialize the mapframe variables for future wraparound, copying
// data out of layerframe, which read the information from the
// XML capabilities file.
//
var flds = new Array( "bbox", "format", "mode", "width", "height", "srs", "onlineresource" );
for ( i = 0; i < flds.length; i++ ) {
mapframe.document.mapform.elements[flds[i]].value =
layerframe.document.layerform.elements[flds[i]].value;
}
//
// Read the mapframe size and set the state variables.
//
doSize();
//
// Have the layerframe initiate the first update. This gets all
// the layer states to match the form values.
//
layerframe.toggle();
}
function doSize() {
//
// Read the mapframe size using javascript and set the
// width and height variables in the mapframe.
//
var width = 500;
var height = 500;
//
// IE has different ways of reading frame size.
//
if( navigator.appName.indexOf('Microsoft') != -1 ) { // IE
if ( window.createPopup ) { // IE >= 5.5
width = top.mapframe.frameElement.clientWidth;
height = top.mapframe.frameElement.clientHeight;
} else { // IE < 5.5
width = top.mapframe.document.body.clientWidth;
height = top.mapframe.document.body.clientHeight;
}
}
//
// Other browsers are fairly consistent.
//
else { // Not IE
width = top.mapframe.innerWidth;
height = top.mapframe.innerHeight;
}
//
// Set the size state values in the mapframe.
//
mapframe.document.mapform.width.value = width;
mapframe.document.mapform.height.value = height;
}
function doResize() {
//
// On a resize event, read the new size, then
// redraw the map.
//
doSize();
mapframe.document.mapform.submit();
}
</SCRIPT>
<SCRIPT LANGUAGE='JavaScript'>
//
// Netscape 4 event handling requires us to capture
// the resize event at the top.
//
if ( navigator.appName.indexOf('Netscape') != -1 ) {
self.captureEvents( Event.RESIZE );
}
//
// Set some event handlers.
//
self.onload = doSetup;
self.onresize = doResize;
</SCRIPT>
</HEAD>
<FRAMESET
border=1
rows=55,*
framespacing=0
>
<FRAME
name=titleframe
frameBorder=Yes
scrolling=No
src="wms_titleframe.php"
>
<FRAMESET
border=1
cols=250,*
frameSpacing=0
>
<FRAME
name=layerframe
frameBorder=Yes
scrolling=Yes
src="wms_layerframe.php?onlineresource=<? echo urlencode($_GET['onlineresource']) ?>"
>
<FRAME
name=mapframe
frameBorder=Yes
marginHeight=0
marginWidth=0
scrolling=No
src="wms_mapframe.php"
>
</FRAMESET>
</FRAMESET>
</HTML>