-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
340 lines (305 loc) · 10.4 KB
/
index.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
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
<!DOCTYPE html>
<html>
<head>
<title>Ottawild Prototype</title>
<!-- Metadata -->
<meta name="application-name" content="Ottawild Prototype" />
<meta name="author" content="Richard Wen @ Ryerson University" />
<meta name="description" content="Prototype for Ottawild Map" />
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.css" />
<link rel="stylesheet" href="js/leaflet.search/src/leaflet-search.css" />
<link rel="stylesheet" href="js/leaflet.sidebar/src/L.Control.Sidebar.css" />
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
<link rel="stylesheet" href="https://cdn.rawgit.com/CliffCloud/Leaflet.EasyButton/f3f3136bda3937aa813c80a1a6c8c921c6df06ed/src/easy-button.css" />
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css">
<!-- Initial Style -->
<style>
html, body {
height: 100vh;
padding: 0;
margin: 0;
}
#map { height: 93vh;}
#top {
width: 100vw;
height: 5vh;
background: black;
padding: 0.75vmin 1.5vmin 1.5vmin 1.5vmin;
font-size: 2vh;
color: white;
}
#bottom {
width: 100vw;
height: 2vh;
background: black;
}
#sidebar, #profile {
width: 70vw;
max-height: 90vh;
}
.intro > .modal-dialog{
width:70% !important;
}
.button{
color: white;
background: black;
}
.button:hover {
background-color: gray;
color: white;
}
.search-input, .leaflet-control-search {
max-width:30vw;
width: 30vw;
}
#primary_nav_wrap ul
{
list-style:none;
position:absolute;
float:left;
margin:0;
padding:0;
z-index:1;
}
#primary_nav_wrap ul a
{
display:block;
color:white;
text-decoration:none;
font-weight:700;
font-size:1.5vh;
line-height:32px;
padding:0 1vmin;
font-family:"HelveticaNeue","Helvetica Neue",Helvetica,Arial,sans-serif
}
#primary_nav_wrap ul li
{
position:relative;
float:left;
margin:0;
padding:0;
}
#primary_nav_wrap ul li.current-menu-item
{
background:black
}
#primary_nav_wrap ul li:hover
{
background:gray;
}
#primary_nav_wrap ul ul
{
display:none;
position:absolute;
left:0;
background:white;
color: black;
padding:10px;
font-size: 1.5vmin;
width: 30vw;
}
#primary_nav_wrap ul ul li
{
float:none;
width:200px;
}
#primary_nav_wrap ul ul a
{
line-height:120%;
padding:10px 15px
}
#primary_nav_wrap ul ul ul
{
top:0;
left:100%
}
#primary_nav_wrap ul li:hover > ul
{
display:block
}
</style>
</head>
<!-- Main -->
<body>
<div id="top">
<nav id="primary_nav_wrap">
<ul>
<li style="background:none;color:#31a354;">Ottawild </li>
<li><a href="#">About</a>
<ul>
<b>"The purpose of Ottawild is to increase awareness of the City’s natural areas among residents and visitors to make nature a part of Ottawa’s identity and positive reputation."</b>
<br>- City of Ottawa
<br><br>One Million Ottawild Experiences seeks to fulfill this purpose by:
<br>• Creating conversation about Ottawa's natural areas
<br>• Providing easy to find information about natural areas
<br>• Increasing knowledge about natural areas through crowdsourced discovery and sharing
<br><br>This is a prototype submitted to the City of Ottawa for the 2015 Geothink Summer Institute (June 15-17).
<br><br>• <b>City of Ottawa:</b> <b><a style="color:blue;padding:0;display:inline;font-size:1.5vmin" href='http://ottawa.ca/en'>ottawa.ca/en</a></b>
<br>• <b>Geothink Summer Institute:</b> <b><a style="color:blue;padding:0;display:inline;font-size:1.5vmin" href='http://summerinstitute.geothink.ca/'>summerinstitute.geothink.ca</a></b>
<br>• <b>Parks data provided by:</b> <b><a style="color:blue;padding:0;display:inline;font-size:1.5vmin" href="http://data.ottawa.ca/en/">http://data.ottawa.ca/en/</a></b>
<br><br><b><a style="color:blue;padding:0;font-size:1.5vmin" href='https://drive.google.com/a/ryerson.ca/file/d/0B0Y-aJ_lG1qMU1FUcVdOaVFpZnc/view'>View the proposal presentation</a></b>
<br>
</ul>
</li>
<li><a href="#">Partners</a>
<ul>
<b>Example partners...</b>
<br>• City Councillors
<br>• Ottawa 2017
<br>• Parks, Recreation & Cultural Services Department
<br>• Ottawa Public Health
<br>• Economic Development and Innovation
<br>• Forestry Services, Public Works Department
<br>• Neighbourhood Connection Office
<br>• Transportation Planning, Planning and Growth Management
<br>• Cleaning the Capital
<br>• Rural Affairs Office
<br>• Grants Programs
</ul>
</li>
<li><a href="#">Collaborators</a>
<ul>
<b>Example collaborators...</b>
<br>• Public partners, federal agencies and departments
<br>• Tourism Sector
<br>• Canadian Museum of Nature
<br>• Universities and Colleges Environmental Programs
<br>• School Boards
<br>• Canadian Organizations
<br>• Outdoor Enthusiasts
<br>• Community organizations
</ul>
</li>
<li><a href="#">Contact</a>
<ul>
<b>The GeoOne Team:</b>
<br><b>• Website:</b> Richard Wen ([email protected])
<br><b>• Wireframing:</b> Samantha Bigs, Paulina Marczak
<br><b>• Presentation:</b> Mark Gill
<br><b>• Legal:</b> Cheryl Power
<br><br><b>Organizers:</b>
<br><b>• Geothink:</b> <b><a style="color:blue;padding:0;display:inline;font-size:1.5vmin" href='http://geothink.ca/'>geothink.ca</a></b>
<br><b>• City of Ottawa:</b> <b><a style="color:blue;padding:0;display:inline;font-size:1.5vmin" href='http://ottawa.ca/en'>ottawa.ca/en</a></b>
</ul>
</li>
</ul>
</nav>
</div>
<div id="map"></div>
<div id="sidebar" style="font-size:2vmin;color:red;overflow: hidden;"><img onclick="chgexp()" src="images/experiences1.jpg" style="height:93%;"><br>Wireframe (non-interactive) for demo purposes only.</div>
<div id="profile" style="font-size:2vmin;color:red;overflow: hidden;"><img src="images/profile.jpg" style="height:93%;"><br>Wireframe (non-interactive) for demo purposes only.</div>
<div id="bottom"></div>
<!-- Libraries -->
<script src="data/parks.json" type="text/javascript"></script>
<script src="http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.js"></script><!-- leaflet.js -->
<script src="js/leaflet.search/src/leaflet-search.js"></script> <!-- leaflet.search.js -->
<script src="js/leaflet.sidebar/src/L.Control.Sidebar.js"></script> <!-- leaflet.sidebar.js -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script> <!-- jquery.js -->
<script src="js/bootbox/bootbox.min.js" type="text/javascript"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
<script src="https://cdn.rawgit.com/CliffCloud/Leaflet.EasyButton/f3f3136bda3937aa813c80a1a6c8c921c6df06ed/src/easy-button.js"></script>
<script src="js/leaflet.fullscreen/Control.FullScreen.js"></script>
<script>
// 1.1 Create Leaflet map
var map = L.map('map').setView([45.4214, -75.6919], 13);
// 1.2 Pull OSM tiles and add to Leaflet map
L.tileLayer('http://stamen-tiles-{s}.a.ssl.fastly.net/toner/{z}/{x}/{y}.png', {
attribution: 'Map tiles by <a href="http://stamen.com">Stamen Design</a>, <a href="http://creativecommons.org/licenses/by/3.0">CC BY 3.0</a> — Map data © <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>',
subdomains: 'abcd',
minZoom: 0,
maxZoom: 20,
ext: 'png'
}).addTo(map);
// 1.3 Add Sidebar Panel
var sidebar = L.control.sidebar('sidebar', {
closeButton: true,
position: 'left'
});
map.addControl(sidebar);
// For demonstration purposes
function chgexp(){
sidebar.setContent('<img onclick="chgexp2()" src="images/experiences2.jpg" style="height:93%;"><p style="font-size:2vmin;color:red;">Wireframe (non-interactive) for demo purposes only.</p>');
};
function chgexp2(){
sidebar.setContent('<img onclick="chgexp()" src="images/experiences1.jpg" style="height:93%;"><p style="font-size:2vmin;color:red;">Wireframe (non-interactive) for demo purposes only.</p>');
};
// 1.4 Add data
L.geoJson(parks,{
style: {
"color": "#31a354",
"weight":3,
"opacity":0.9}
}).addTo(map).on('click',function (e) {
sidebar.show();
map.closePopup();
});
// 1.5 Add Profile
var profile = L.control.sidebar('profile', {
closeButton: true,
position: 'left'
});
map.addControl(profile);
L.easyButton({
position: 'topleft', // inherited from L.Control -- the corner it goes in
type: 'replace',
leafletClasses: true, // use leaflet classes to style the button?
states:[{ // specify different icons and responses for your button
stateName: 'profile',
onClick: function(button, map){
profile.show();
},
icon: 'fa-user'
}]
}).addTo(map);
map.on('click', function () {
sidebar.hide();
profile.hide();
});
// 1.6 Add search control
map.addControl(new L.Control.Search({
url: 'http://nominatim.openstreetmap.org/search?format=json&q={s}',
jsonpParam: 'json_callback',
propertyName: 'display_name',
propertyLoc: ['lat','lon'],
circleLocation: true,
markerLocation: true,
autoType: false,
autoCollapse: true,
minLength: 2,
zoom: 15,
position: 'topright'
}));
// 2. Initial Bootbox
bootbox.dialog({
closeButton: false,
message: '<div style="font-size:2vmin;color:red;overflow: hidden;"><img src="images/intro.jpg" style="width:90%;"><br>Wireframe (non-interactive) for demo purposes only.</div>',
className: "intro",
buttons: {
enter: {
label: "Enter",
className: "button",
callback: function() {
}
},
login: {
label: "Login",
className: "button",
callback: function() {
}
},
signup: {
label: "Sign Up",
className: "button",
callback: function() {
}
}
}
});
// 3.1 Initial Popup
var helpPopup = L.popup()
helpPopup.setContent('<p style="text-align: center;"><b>Click on any <span style="color:#31a354">PARK</span> to start your experience!</b></p>').setLatLng(map.getCenter()).openOn(map);
</script>
</body>
</html>