-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathCouncilTaxPerHeadWales.html
More file actions
169 lines (141 loc) · 4.43 KB
/
CouncilTaxPerHeadWales.html
File metadata and controls
169 lines (141 loc) · 4.43 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
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no">
<meta charset="utf-8">
<title>Council Tax per head</title>
<style>
/* Always set the map height explicitly to define the size of the div
* element that contains the map. */
#map-canvas {
height: 500px;
width: 500px;
float: left;
}
#controls {
height: 500px;
width: 100px
float: left;
padding:10px;
}
/* Optional: Makes the sample page fill the window. */
html, body {
height: 100%;
margin: 0;
padding: 0;
}
</style>
<script>
var layer;
var tableid;
var querystring;
function mapRefresh() {
var map = new google.maps.Map(document.getElementById('map-canvas'), {
center: {
lat: 52.2397355,
lng: -3.392428
},
zoom: 8
});
// console.log('Hello world!');
layer = new google.maps.FusionTablesLayer({
query: {
select: 'Geometry',
from: tableid,
where: querystring
},
options: {
styleId: 2,
templateId: 2
}
}),
layer.setMap(map);
}
function mapHide() {
var map = new google.maps.Map(document.getElementById('map-canvas'), {
center: {
lat: 52.2397355,
lng: -3.392428
},
zoom: 8
});
// console.log('Hello world!');
var layer;
var tableid = '1E0ENRSUkCtzrMWeHuVUdgIcOD4-yaWcHyPBGf_u-';
var querystring = " col2>>0 >= '2008 Jan 1' and col2>>0 <= '2009 Jan 1'";
layer = new google.maps.FusionTablesLayer({
query: {
select: 'Geometry',
from: tableid,
where: querystring
},
options: {
styleId: 2,
templateId: 2
}
}),
layer.setMap(null);
}
function evaluateMapState(){
if (document.getElementById("20089").checked)
{
tableid = '1E0ENRSUkCtzrMWeHuVUdgIcOD4-yaWcHyPBGf_u-';
querystring = "col2\x3e\x3e0 \x3e\x3d \x272008 Jan 1\x27 and col2\x3e\x3e0 \x3c\x3d \x272009 Jan 1\x27";
mapRefresh();
}
if (document.getElementById("200910").checked){
tableid = '1E0ENRSUkCtzrMWeHuVUdgIcOD4-yaWcHyPBGf_u-';
querystring = " col2>>0 >= '2009 Apr 1' and col2>>0 <= '2010 Mar 31'";
mapRefresh();
}
if (document.getElementById("201011").checked){
tableid = '1E0ENRSUkCtzrMWeHuVUdgIcOD4-yaWcHyPBGf_u-';
querystring = " col2>>0 >= '2010 Apr 1' and col2>>0 <= '2011 Mar 31'";
mapRefresh();
}
if (document.getElementById("201112").checked){
tableid = '1E0ENRSUkCtzrMWeHuVUdgIcOD4-yaWcHyPBGf_u-';
querystring = " col2>>0 >= '2011 Apr 1' and col2>>0 <= '2012 Mar 31'";
mapRefresh();
}
if (document.getElementById("201213").checked){
tableid = '1E0ENRSUkCtzrMWeHuVUdgIcOD4-yaWcHyPBGf_u-';
querystring = " col2>>0 >= '2012 Apr 1' and col2>>0 <= '2013 Mar 31'";
mapRefresh();
}
if (document.getElementById("201314").checked){
tableid = '1E0ENRSUkCtzrMWeHuVUdgIcOD4-yaWcHyPBGf_u-';
querystring = " col2>>0 >= '2013 Apr 1' and col2>>0 <= '2014 Mar 31'";
mapRefresh();
}
}
</script>
<script async defer
src="https://maps.googleapis.com/maps/api/js?key=AIzaSyDQzcUq5Pfafx-DrIP6m063PDGtywrtbpA&callback=initMap">
</script>
</head>
<body>
<div style="align:right;width:500px;height:500px;" id="map-canvas"></div>
<div id="controls">
<h1> Select the financial year</h1>
<form action="">
<input id="20089" type="radio" name="option" >2008/9<br>
<input id="200910" type="radio" name="option" >2009/10<br>
<input id="201011" type="radio" name="option" >2010/11<br>
<input id="201112" type="radio" name="option" >2011/12<br>
<input id="201213" type="radio" name="option" >2012/13<br>
<input id="201314" type="radio" name="option" >2013/14<br>
</form>
<button onclick="evaluateMapState()">Update map</button>
<h1>Legend</h1>
<h2>Council Tax Income per head of population</h2>
<table>
<tr><td style="background-color:#ff0000"> </td><td>£285 - £361</td></tr>
<tr><td style="background-color:#ff9900"> </td><td>£361 - £437</td></tr>
<tr><td style="background-color:#ffff00"> </td><td>£437 - £513</td></tr>
<tr><td style="background-color:#00ff00"> </td><td>£513 - £589</td></tr>
<tr><td style="background-color:#00ffff"> </td><td>£589 - £665</td></tr>
</table>
</div>
</body>
</html>