-
Notifications
You must be signed in to change notification settings - Fork 3
/
index-dev.html
249 lines (234 loc) · 6.49 KB
/
index-dev.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
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="mobile-web-app-capable" content="yes">
<link rel="stylesheet" href="bower_components/leaflet/dist/leaflet.css"/>
<link rel="stylesheet" href="style/spinner.css"/>
<link href='https://fonts.googleapis.com/css?family=Dancing+Script|Overlock' rel='stylesheet' type='text/css'>
<style>
* {font-family: 'Overlock', sans-serif;}
body, html {margin: 0;padding: 0;overflow:hidden;}
h1,h2,h3{font-family: 'Dancing Script', cursive;}
h1 {
padding: 0.2em;
background: rgba(49,130,189,0.1);
margin: 0px;
}
h2 {
margin: 0px 0em 0.3em 0em;
padding:1em 0.2em 0.2em 0.2em;
border-bottom: solid 1px rgba(49,130,189,0.1);
}
h3 {
font-size: smaller;
}
#sidebar a {
color: black;
border-bottom: solid 2px rgba(49,130,189,0.2);
text-decoration:none;
}
#sidebar a:hover {
border-bottom: solid 2px rgba(49,130,189,0.6);
}
#sidebar a:visited {
border-bottom: solid 1px rgba(49,130,189,0.1);
}
div {
padding 0.2em}
#map {position:absolute;background: #636363;width: 100%;top: 0px;bottom: 0px;}
#spinnerdiv {
position: absolute;
top: 60px;
right: 60px;
z-index: 10000;
background: rgba(255,255,255,0.8);
width: 60px;
height: 60px;
border-radius: 30px;
}
#sidebar {
background: white;
border-left: 1px solid #636363;
width: 23em;
position: absolute;
top: 0px;
bottom: 0px;
right: -23em;
transition: right 200ms;
display:flex;
align-items: stretch;
}
#sidebar.open {
right: 0px;
}
#sidebar .content {
margin: 0.5em;
width: 23em;
overflow-y: auto;
overflow-x:hidden;
}
#piefje {
position: absolute;
top:10px;
right: 0em;
height: 3em;
width:2em;
background: rgba(255,255,255,0.5);
border-radius: 10px 0px 0px 10px;
cursor: pointer;
border-top: 1px solid #636363;
border-bottom: 1px solid #636363;
border-left: 1px solid #636363;
color: #636363;
transition: right 200ms;
}
.piefje-icon {
text-align: center;
font-size: 2em;
}
#piefje.open .open {
display: none;
}
#piefje .close {
display: none;
}
#piefje.open .close {
display: block;
}
#piefje:hover {
background: rgba(49,130,189,0.8);
color: white;
font-weight: bold;
border-top: 1px solid white;
border-bottom: 1px solid white;
border-left: 1px solid white;
}
#piefje.open {
right: 23em;
}
#colorlist {
display: flex;
}
.colorbar {
border: solid 1px white;
padding: 1px;
height: 45px;
}
.colorbar:hover {
border: solid 1px rgba(49,130,189,0.8);
background: rgba(49,130,189,0.8);
}
.colorbar.active {
border: solid 1px rgb(49, 163, 84);
background: #addd8e;
}
#colorlist rect {
stroke: #333;
stroke-width: 0.5px;
cursor: pointer;
}
.legendrow {
display:flex;
}
.legendcolor {
width: 30px;
height:30px;
}
.legendvalue,.legendunit {
margin-top: -10px;
margin-left: 4px;
}
input[type=number]{
width: 2em;
}
.leaflet-top-pane {
pointer-events: none;
}
#mettext {
float:right;
border: solid 1px rgba(49,130,189,0.1);
border-radius: 0.5em;
width: 1em;
height: 1em;
text-align: center;
margin-top: 5px;
line-height: 1;
cursor:pointer;
}
#mettext:hover {
border: solid 1px rgba(49,130,189,0.6);
}
.hidden {
display:none;
}
</style>
</head>
<body>
<template id="optionTemplate">
<option></option>
</template>
<template id="colorTemplate">
<div class="colorbar">
<svg height="45" width="15">
<rect y="0" height="15" width="15" class="c0" fill="white"></rect>
<rect y="15" height="15" width="15" class="c1" fill="white"></rect>
<rect y="30" height="15" width="15" class="c2" fill="white"></rect>
</svg>
</div>
</template>
<template id="legendTemplate">
<div class="legendrow">
<div class="legendcolor"></div><div class="legendvalue"></div><div class="legendunit"></div>
</div>
</template>
<div id="spinnerdiv" class="cssload-container">
<div id="spinner" class="cssload-whirlpool"></div>
</div>
<div id="map"></div>
<div id="piefje" class="open"><div class="piefje-icon close">»</div><div class="piefje-icon open">«</div></div>
<div id="sidebar" class="open">
<div class="content">
<h1>3 step CBS explorer <span id="mettext" class="show">✔</span></h1>
<h2>① Theme</h2>
<p class="text">
Choose a theme to display on the map. For more information see the <a href="http://www.cbs.nl/en-GB/menu/home/default.htm?Languageswitch=on">CBS</a> <a href="http://www.cbs.nl/NR/rdonlyres/E9691D77-C5D4-4175-88E2-193BF73758DF/0/2015toelichtingwijkenbuurtkaart20122014.pdf">explanation</a> of the themes.
</p>
<select id="themeselector"></select>
<h2>② Classification</h2>
<p class="text">
Choose a classification method to visualise your theme. You can choose between <a href="http://wiki.gis.com/wiki/index.php/Quantile">quantile</a>, <a href="http://wiki.gis.com/wiki/index.php/Equal_Interval_classification">equal interval</a> and diverging from the mean by standard deviation based steps.
</p>
<div>
<input class="classselect" type='radio' value='q' checked name="clas">Quantile</input>
<input class="classselect" type='radio' value='l' name="clas" >Equal interval</input>
<input class="classselect" type='radio' value='s' name="clas" >Diverging</input>
</div>
<h2>③ Colorscheme</h2>
<p class="text">Pick a colorscheme you like, note that diverging maps require a different set of colors...</p>
<div id="colorlist"></div>
<div>
<p><span class="text">...and choose the number of classes you want to display on the map:</span>
<input id="numberclasses" type="number" min="3" max="9" value="5" size="1"></input><span class="text"> and you are all set.</span></p>
</div>
<h2>Result</h2>
<div id="legenda">
</div>
<p class="text">You can change the opacity of your visualisation to see the map below:</p>
<input type="range" min="0" max="1" step="0.05" value="1" id="opacityslider" style="width:18em"></input><br/>
Show labels on top of your map: <input type="checkbox" id="labels" checked></input>
<h2>Information</h2>
Made by <a href="http://twitter.com/stvno">@stvno</a>
</div>
<script src="bower_components/d3/d3.min.js"></script>
<script src="bower_components/leaflet/dist/leaflet.js"></script>
<script src="bower_components/leaflet-hash/leaflet-hash.js"></script>
<script type="text/javascript" src="http://maps.stamen.com/js/tile.stamen.js?v1.3.0"></script>
<script src="bower_components/Leaflet.MapboxVectorTile/dist/Leaflet.MapboxVectorTile.min.js"></script>
<script src="src/colorbrewer.js"></script>
<script src="src/main.js"></script>
<script src="src/ui.js"></script>
</body>
</html>