-
Notifications
You must be signed in to change notification settings - Fork 0
/
surface_index.html
673 lines (592 loc) · 27.8 KB
/
surface_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
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
<!DOCTYPE html>
<html lang="en">
<head>
<title>Surface Water</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta property="og:title" content="Oregon Drinking Water" />
<meta property="og:url" content="http://rawgit.com/cartobaldrica/water_atlas/master/surface_index.html" />
<meta property="og:description" content="Explore Oregon's surface water." />
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.0.2/dist/leaflet.css" />
<link rel="stylesheet" type="text/css" href="css/surface_style.css">
<link rel="stylesheet" href="css/control-minimap.css" />
<link rel="stylesheet" href="css/ekko-lightbox.css"/>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" type="text/css" href="https://fonts.googleapis.com/css?family=Inconsolata" />
<link rel="shortcut icon" href="img/oregon.ico" type="image/x-icon">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/3.5.2/animate.min.css">
<script src="https://unpkg.com/leaflet@1.0.2/dist/leaflet.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<script src="js/leaflet.ajax.min.js"></script>
<script src="js/storymap_fixed.js"></script>
<script src="js/ekko-lightbox.js"></script>
<script src="js/control-minimap.js" type="text/javascript"></script>
</head>
<body>
<div class="container-fluid">
<div class="row">
<div class="col-sm-6 col-md-4 main">
<section data-scene="overview">
<div class= "overview-background-img background-fullscreen-setting text-responsive text-shadow: black 0.2em 0.2em 0.3em;"><h4 class="text-center" style="color: white">Surface Water</h4><h4 class ="text-center" style="font-size:20px; margin-top:0px; color: #ffffff; text-shadow: black 0.2em 0.2em 0.3em; margin-left: 25%; margin-right:25%; text-align: justify;">Surface water weaves across the Oregon landscape, defining distinct ecoregions and watersheds. Surface freshwater includes rivers, lakes, and wetlands. Surface water is an important environmental resource for natural systems and human use.</h4>
<br/><br/>
<p class ="text-center" style="font-size:14px; margin-top:0px; color: #ffffff; text-shadow: black 0.2em 0.2em 0.3em; margin-left:30%; margin-right:30%; display:block">Created by Gareth Baldrica-Franklin, Institute for Water and Watersheds, Oregon State University</p></div>
<br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/>
</section>
<section data-scene="rivers">
<h3>Rivers</h3>
<p>Rivers are the primary driver of surface water systems. The largest river in Oregon is the Columbia, which snakes its way across the northern Oregon border. Many of Oregon's larger rivers are tributaries of the Columbia, such as the Willamette, Deschutes and John Day. Other major rivers include the Klamath, Rogue and Umpqua.</p>
<br/><br/><p>Widespread damming has reduced the flow of many Oregon Rivers below their natural levels. The John Day River is the longest river in Oregon that has remained undammed.</p>
<br/>
<br/>
<div class ="leg">
<p>Hover over rivers for details.</p>
</div>
</section>
<section data-scene="watersheds">
<h3>Watersheds</h3>
<p>Rivers define watersheds (or basins). Watersheds represent the total area that drains into a river, or river section. Watersheds can be defined at various scales, representing vast basins of major rivers, or small areas of urban creeks.</p>
<br/>
<br/>
<p>Watersheds shown in the map are recorded at the 4th level of delineation, and colored based on the third level of delineation. At lower levels of delineation, watersheds are generalized to major rivers and regions.</p>
<br/>
<br/>
<div class ="leg">
<p>Hover over watersheds for details.</p>
</div>
</section>
<section data-scene="lakes">
<h3>Lakes</h3>
<p>Oregon is filled with lakes. Some are naturally occurring, some are manmade, and some are ephemeral, only existing in wet months. Many of Oregon's largest naturally occurring lakes exist in the southern part of the state.</p>
<br/>
<br/>
<div class ="leg">
<p>Lake Type</p><br/>
<i style = "background: #0047b3;"></i><p>Natural</p><br/>
<i style = "background: #4d94ff;"></i><p>Manmade/Reservoir</p><br/>
<p>Hover over lakes for details.</p>
</div>
</section>
<section data-scene="councils">
<h3>Watershed Councils</h3>
<p>Watershed councils are independent, voluntary organizations designed established to improved watersheds in their localities. Watershed councils are strictly managed locally, although the state provides guidance for their formation. Councils assess local water conditions, provide restorative and conservation services, and create communities revolved around protecting water.</p>
<br/>
<br/>
<div class ="leg">
<p>Hover over map for details.</p>
</div>
</section>
<section data-scene="wetlands">
<h3>Wetlands</h3>
<p>Over 40% of Oregon's wetlands have drained or filled since Euro-American settlement. However, wetlands are among the most important ecosystems for wildlife and water quality. Wetlands store and clean water, prevent erosion and control flooding. They are also important habitats for a variety of plants and animals.</p>
<br/>
<br/>
<p>This map shows Oregon's "Greatest Wetlands", which were identified by the Wetlands Conservancy.</p>
<div class ="leg">
<br/>
<br/>
<p>Hover over wetlands for details.</p>
</div>
</section>
<section data-scene="river_pollution">
<h3>Pollution</h3>
<p>The Oregon Department of Environmental Quality (DEQ) assesses rivers and lakes for pollutants. Pollutants can include minerals, chemicals, biological agents, sediment or temperature issues. If identified pollutants are above certain concentrations, a waterbody is declared Water Quality Limited for that pollutant.</p>
<br/>
<br/>
<p>The map aggregates all identified water quality limited pollutants for 2012 into their respective watersheds.</p>
<br/>
<br/>
<div class ="leg">
<p>Number of Pollutants</p><br/>
<i style = "background: #f8000c;"></i><p> Greater than 101</p><br/>
<i style = "background: #ff6343;"></i><p> 51-100</p><br/>
<i style = "background: #ffa458;"></i><p> 26-50</p><br/>
<i style = "background: #ffd58d;"></i><p> 11-25</p><br/>
<i style = "background: #feffcd;"></i><p> Less than 10</p><br/>
<p>Hover over watersheds for details.</p>
</div>
</section>
<section data-scene="end">
<div class= "end-background-img background-fullscreen-setting text-responsive"><br>
<br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/>
</section>
<i class="animated zoomIn infinite glyphicon glyphicon-menu-down arrow-down"></i>
</div>
<div id="map" class="col-sm-6 col-md-8 sidebar"></div>
</div>
<i class="fa fa-info-circle social" style="right:70px;" data-toggle="modal" data-target="#info-modal"></i>
<a class="fa fa-facebook-square social2" style="right:55px;" href="https://facebook.com/sharer.php?u=http://rawgit.com/cartobaldrica/water_atlas/master/surface_index.html" target="_blank"></a>
<a class="fa fa-twitter-square social3" style="right:40px;" href="https://twitter.com/home?status=Oregon's%20Surfacewater%0Ahttp%3A//rawgit.com/cartobaldrica/water_atlas/master/surface_index.html" target="_blank"></a>
<a class="fa fa-github-square social3" style="right:25px;" href="https://github.com/cartobaldrica/water_atlas" target="_blank"></a>
<ul class="navbar text-center"></ul>
<div class="modal fade" id="info-modal" role="dialog">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">×</button>
<h2 class="modal-title">About</h2>
</div>
<div class="modal-body">
<p2 style="font-size:20px">Geographic Data</p2><br>
<p2>Rivers: <a href = "spatialdata.oregonexplorer.info/geoportal/details;id=161b8e74e7ef457180fba6429c9ee1ee" target="_blank">Oregon Spatial Data Library</a></p2><br>
<p2>Watersheds: <a href = "http://spatialdata.oregonexplorer.info/geoportal/details;id=4b1b008d5a764a209b2df040689c0779" target="_blank">Oregon Spatial Data Library</a></p2><br>
<p2>Lakes: <a href = "http://spatialdata.oregonexplorer.info/geoportal/details;id=c56af1d4a19040e98e25c05abc5e690f" target="_blank">Oregon Spatial Data Library</a></p2><br>
<p2>Watershed Councils: <a href = "http://spatialdata.oregonexplorer.info/geoportal/details;id=8091c70c2e7347d4ba0f8d8d0c5647c0" target="_blank">Oregon Spatial Data Library</a></p2><br>
<p2>Wetlands: <a href = "http://spatialdata.oregonexplorer.info/geoportal/details;id=1d70e0668a804b5fa4a4c5492a05168a" target="_blank">Oregon Spatial Data Library/Wetlands Conservancy</a></p2><br>
<p2>Pollution: <a href = "https://www.oregon.gov/deq/Data-and-Reports/Pages/GIS.aspx" target="_blank">Oregon Department of Environmental Quality</a></p2><br>
<p2 style="font-size:20px">Text Data</p2><br>
<p2>United States Geological Survey</p2><br/>
<p2>Oregon Water Resources Department</p2><br/>
<p2>The Wetlands Conservancy</p2><br/>
<p2>Oregon Department of Environmental Quality</p2><br/>
</div>
<div class="modal-footer">
<p2>Created with Leaflet</p>
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
</div>
<script type="text/javascript">
//basin
function setBasinColor(string){
if (string == 'Black Rock Desert'){return '#66a3ff'}
else if (string == 'Deschutes'){return '#80b3ff'}
else if (string == 'John Day'){return '#66a3ff'}
else if (string == 'Klamath'){return '#3385ff'}
else if (string == 'Lower Columbia'){return '#66a3ff'}
else if (string == 'Lower Snake'){return '#005ce6'}
else if (string == 'Middle Columbia'){return '#3385ff'}
else if (string == 'Middle Snake-Boise'){return '#3385ff'}
else if (string == 'Middle Snake-Powder'){return '#80b3ff'}
else if (string == 'Northern California Coastal'){return '#66a3ff'}
else if (string == 'Northern Oregon Coastal'){return '#80b3ff'}
else if (string == 'Oregon Closed Basins'){return '#4d94ff'}
else if (string == 'Southern Oregon Coastal'){return '#4d94ff'}
else if (string == 'Upper Sacramento'){return '#005ce6'}
else if (string == 'Washington Coastal'){return '#3385ff'}
else {return'#005ce6'}
}
function basinStyle(feature) {
return {
fillColor: setBasinColor(feature.properties.HU6NAME),
fillOpacity: .6,
color: setBasinColor(feature.properties.HU6NAME),
radius: 4,
opacity: 0.8,
weight: 1
};
}
function highlightBasin(e) {
var layer = e.target;
layer.setStyle({
fillOpacity: 1,
weight: 2
});
layer.bringToFront();
}
function resetBasin(e) {
var layer = e.target;
layer.setStyle({
fillOpacity: 0.6,
weight: 1
});
}
//rivers
function riverSize(density){
return density >200 ? 3:
density >100 ? 2.5:
density >50 ? 2:
density >25 ? 1:
density >10 ? .4:
.15;
}
function riverStyle(feature) {
return {
color: '#66a3ff',
opacity: 0.8,
weight: riverSize(feature.properties.length_mi)
};
}
function highlightRiver(e) {
var layer = e.target;
layer.setStyle({
fillOpacity: 1,
color: '#b3d1ff',
});
layer.bringToFront();
}
function resetRiver(e) {
var layer = e.target;
layer.setStyle({
fillOpacity: 0.8,
color: '#66a3ff',
});
}
//lakes
function lakeColor(density){
if (density == 1){return '#4d94ff'}
else {return '#0047b3'}
}
function lakeStyle(feature) {
return {
fillColor: lakeColor(feature.properties.reservoir),
fillOpacity: .6,
color: lakeColor(feature.properties.reservoir),
radius: 4,
opacity: 0.8,
weight: 1
};
}
//watershed councils
function councilStyle(feature) {
return {
fillColor: '#66a3ff',
fillOpacity: .6,
color: '#66a3ff',
radius: 4,
opacity: 0.8,
weight: 1
};
}
function councilSmall(feature) {
return {
fillColor: '#66a3ff',
fillOpacity: 0,
color: '#66a3ff',
radius: 4,
opacity: 0.8,
weight: 1,
dashArray: "10, 5"
};
}
function resetCouncil(e) {
var layer = e.target;
layer.setStyle({
fillOpacity: 0,
weight: 1,
dashArray: "5, 5"
});
layer.bringToFront();
}
function front(e) {
var layer = e.target;
layer.bringToFront();
}
//river pollution
function riverPollutionColor(density){
return density > 15 ? '#f8000c':
density >10 ? '#ff6343':
density >5 ? '#ffa458':
density >1 ? '#ffd58d':
'#feffcd';
}
function pollutionSize(density){
return density >200 ? 5:
density >100 ? 4:
density >50 ? 3:
density >25 ? 2:
1;
}
function pollutionStyle(feature) {
return {
color: riverPollutionColor(feature.properties.SUM_count),
opacity: 0.8,
weight: pollutionSize(feature.properties.length_mi)
};
}
function highlightPollution(e) {
var layer = e.target;
layer.setStyle({
fillOpacity: 1,
});
layer.bringToFront();
}
function resetPollution(e) {
var layer = e.target;
layer.setStyle({
fillOpacity: 0.8,
});
}
//river pollution points
function pointRadius(density){
return density > 200 ? 12:
density >100 ? 10:
density >50 ? 8:
density >25 ? 5:
3;
}
function pointColor(density){
return density > 15 ? '#f8000c':
density >10 ? '#ff6343':
density >5 ? '#ffa458':
density >2 ? '#ffd58d':
'#feffcd';
}
//lake pollution
function lakePollutionColor(density){
return density > 6 ? '#f8000c':
density >4 ? '#ff6343':
density >2 ? '#ffa458':
density >1 ? '#ffd58d':
'#feffcd';
}
function lakePollutionStyle(feature) {
return {
color: lakePollutionColor(feature.properties.SUM_count),
opacity: 0.8,
weight: 1,
fillColor: lakePollutionColor(feature.properties.SUM_count),
fillOpacity:0.6,
};
}
//lake pollution points
function lakePollutionRadius(density){
return density > 200 ? 12:
density >100 ? 10:
density >50 ? 8:
density >25 ? 5:
3;
}
//wetlands
function wetlandStyle(feature) {
return {
fillColor: '#29a3a3',
fillOpacity: .6,
color: '#29a3a3',
radius: 4,
opacity: 0.8,
weight: 1
};
}
//watershed pollution
function watershedPollutionStyle(feature) {
return {
fillColor: watershedPollutionColor(feature.properties.NUMPOINTS),
fillOpacity: .6,
color: watershedPollutionColor(feature.properties.NUMPOINTS),
radius: 4,
opacity: 0.8,
weight: 1
};
}
function watershedPollutionColor(density){
return density > 100 ? '#f8000c':
density >50 ? '#ff6343':
density >25 ? '#ffa458':
density >10 ? '#ffd58d':
'#feffcd';
}
var layers = {
'basins': [L.geoJson.ajax('http://mapious.ceoas.oregonstate.edu/geoserver/baldricg_atlas/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=baldricg_atlas:oregon_watersheds_small&maxFeatures=1000&outputFormat=application%2Fjson', {
style:basinStyle, onEachFeature: function(feature, featureLayer) {
featureLayer.bindTooltip(feature.properties.Name + "<br>" + feature.properties.HU6NAME + " Basin", {className: 'label_tooltip'});
featureLayer.on({
mouseover: highlightBasin,
mouseout: resetBasin
})
}}
)],
'watershed_pollution': [L.geoJson.ajax('http://mapious.ceoas.oregonstate.edu/geoserver/baldricg_atlas/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=baldricg_atlas:watershed_pollution&maxFeatures=1000&outputFormat=application%2Fjson', {
style:watershedPollutionStyle, onEachFeature: function(feature, featureLayer) {
featureLayer.bindTooltip(feature.properties.Name + "<br>" + feature.properties.NUMPOINTS + " Water Quality Limited Pollutants", {className: 'label_tooltip'});
featureLayer.on({
mouseover: highlightBasin,
mouseout: resetBasin
})
}}
)],
'councils': [L.geoJson.ajax('http://mapious.ceoas.oregonstate.edu/geoserver/baldricg_atlas/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=baldricg_atlas:watershed_councils&maxFeatures=1000&outputFormat=application%2Fjson', {
style:councilStyle, onEachFeature: function(feature, featureLayer) {
featureLayer.bindTooltip(feature.properties.instName, {className: 'label_tooltip'});
featureLayer.on({
mouseover: highlightBasin,
mouseout: resetBasin
})
}}
)],
'councils_small': [L.geoJson.ajax('http://mapious.ceoas.oregonstate.edu/geoserver/baldricg_atlas/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=baldricg_atlas:watershed_councils_small&maxFeatures=1000&outputFormat=application%2Fjson', {
style:councilSmall, onEachFeature: function(feature, featureLayer) {
featureLayer.bindTooltip(feature.properties.instName, {className: 'label_tooltip'});
featureLayer.on({
mouseover: highlightBasin,
mouseout: resetCouncil,
add: front
})
}}
)],
'rivers': [L.tileLayer.wms("http://mapious.ceoas.oregonstate.edu/geoserver/baldricg_basemap/wms", {
layers: 'baldricg_basemap:oregon_surface_water2',
format: 'image/png',
minZoom: 6,
maxZoom: 15,
transparent: true,
})],
'lakes': [L.geoJson.ajax('http://mapious.ceoas.oregonstate.edu/geoserver/baldricg_atlas/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=baldricg_atlas:lakes_or&maxFeatures=5000&outputFormat=application%2Fjson', {
style:lakeStyle, onEachFeature: function(feature, featureLayer) {
featureLayer.bindTooltip(feature.properties.NAME, {className: 'label_tooltip'});
featureLayer.on({
mouseover: highlightBasin,
mouseout: resetBasin
})
}}
)],
'wetlands': [L.geoJson.ajax('http://mapious.ceoas.oregonstate.edu/geoserver/baldricg_atlas/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=baldricg_atlas:oregon_wetlands&maxFeatures=5000&outputFormat=application%2Fjson', {
style:wetlandStyle, onEachFeature: function(feature, featureLayer) {
featureLayer.bindTooltip(feature.properties.OGW_Site_N, {className: 'label_tooltip'});
featureLayer.on({
mouseover: highlightBasin,
mouseout: resetBasin
})
}}
)],
'lake_pollutants': [L.geoJson.ajax('http://mapious.ceoas.oregonstate.edu/geoserver/baldricg_atlas/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=baldricg_atlas:lake_pollutants_2012&maxFeatures=5000&outputFormat=application%2Fjson', {
style:lakePollutionStyle, onEachFeature: function(feature, featureLayer) {
featureLayer.bindTooltip(feature.properties.LAKE_NAME + " : " + feature.properties.SUM_count + " Pollutants", {className: 'label_tooltip'});
featureLayer.on({
mouseover: highlightBasin,
mouseout: resetBasin
})
}}
)],
'hydrography': [L.tileLayer.wms("http://mapious.ceoas.oregonstate.edu/geoserver/baldricg_basemap/wms", {
layers: 'baldricg_basemap:oregon_hydrogaphy',
format: 'image/png',
minZoom: 6,
maxZoom: 15,
transparent: true,
})],
'surface_rivers': [L.geoJson.ajax('http://mapious.ceoas.oregonstate.edu/geoserver/baldricg_atlas/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=baldricg_atlas:surface_rivers&maxFeatures=13000&outputFormat=application%2Fjson', {
style:riverStyle, onEachFeature: function(feature, featureLayer) {
featureLayer.bindTooltip(feature.properties.NAME, {className: 'label_tooltip', sticky:true});
featureLayer.on({
mouseover: highlightRiver,
mouseout: resetRiver
})
}}
)],
'river_pollutants': [L.geoJson.ajax('http://mapious.ceoas.oregonstate.edu/geoserver/baldricg_atlas/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=baldricg_atlas:river_pollutants_2012&maxFeatures=13000&outputFormat=application%2Fjson', {
style:pollutionStyle, onEachFeature: function(feature, featureLayer) {
featureLayer.bindTooltip(feature.properties.STREAM_NAM + " : " + feature.properties.SUM_count + " Pollutants", {className: 'label_tooltip', sticky:true});
featureLayer.on({
mouseover: highlightPollution,
mouseout: resetPollution
})
}}
)],
'river_pollutant_points': [L.geoJson.ajax('http://mapious.ceoas.oregonstate.edu/geoserver/baldricg_atlas/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=baldricg_atlas:river_pollutant_points_2012&maxFeatures=13000&outputFormat=application%2Fjson', {
pointToLayer: function (feature, latlng) {
return L.circleMarker(latlng, {
color: '#ffffff',
fillColor: pointColor(feature.properties.SUM_count),
radius: pointRadius(feature.properties.length_mi),
opacity: 1,
fillOpacity: 1,
weight: 0.5
}
).bindTooltip(feature.properties.STREAM_NAM + " : " + feature.properties.SUM_count + " Pollutants", {className: 'label_tooltip'});
}
})]
};
var scenes = {
overview: {lat: 44.1347254, lng:-122.7411479, zoom: 7, position:'fullpage'},
rivers: {lat: 44.1347254, lng:-122.7411479, zoom: 7, layers:['surface_rivers','hydrography']},
watersheds: {lat: 44.1347254, lng:-122.7411479, zoom: 7, layers:['basins']},
lakes: {lat: 44.1347254, lng:-122.7411479, zoom: 7, layers:['lakes']},
councils: {lat: 44.1347254, lng:-122.7411479, zoom: 7, layers:['councils','councils_small']},
wetlands: {lat: 44.1347254, lng:-122.7411479, zoom: 7, layers:['wetlands']},
river_pollution: {lat: 44.1347254, lng:-122.7411479, zoom: 7, layers:['watershed_pollution']},
end: {lat: 44.1347254, lng:-122.7411479, zoom: 7, position:'fullpage'}
};
$('.main').storymap({
scenes: scenes,
layers:layers,
legend: false,
scale:false,
navbar: true,
createMap: function () {
// create a map in the "map" div, set the view to a given place and zoom
var map = L.map('map',{zoomControl:false, scrollWheelZoom:false}).setView([44.1347254, -122.7411479], 7);
// add an basemap, which can be either OSM, mapbox, tilelayer, wmslayer or those designed by yourself.
/*L.tileLayer.wms("http://localhost:8080/geoserver/basemap/wms", {
layers: 'basemap:basemap_dark',
format: 'image/png',
minZoom: 6,
maxZoom: 15,
transparent: true,
attribution: "Created by Gareth Baldrica-Franklin"
}).addTo(map);
L.tileLayer.wms("http://localhost:8080/geoserver/basemap/wms", {
layers: 'basemap:basemap_dark_labels',
format: 'image/png',
minZoom: 6,
maxZoom: 15,
transparent: true,
tiled: true,
tilesorigin: [-180, 90]
}).addTo(map);
var CartoDB_DarkMatterNoLabels = L.tileLayer('http://{s}.basemaps.cartocdn.com/dark_all/{z}/{x}/{y}.png', {
attribution: '© <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a> © <a href="http://cartodb.com/attributions">CartoDB</a>',
subdomains: 'abcd',
minZoom: 6,
maxZoom: 10,
}).addTo(map);
*/
L.tileLayer.wms("http://mapious.ceoas.oregonstate.edu/geoserver/baldricg_basemap/wms", {
layers: 'baldricg_basemap:or_relief',
format: 'image/png',
minZoom: 6,
maxZoom: 10,
opacity:0.2,
transparent: true,
}).addTo(map);
L.tileLayer.wms("http://mapious.ceoas.oregonstate.edu/geoserver/baldricg_basemap/wms", {
layers: 'baldricg_basemap:states_light',
format: 'image/png',
minZoom: 6,
maxZoom: 10,
opacity:0.5,
transparent: true,
}).addTo(map);
L.tileLayer.wms("http://mapious.ceoas.oregonstate.edu/geoserver/baldricg_basemap/wms", {
layers: 'baldricg_basemap:water_counties',
format: 'image/png',
minZoom: 6,
maxZoom: 10,
opacity:0.8,
transparent: true,
}).addTo(map);
oregonCover = L.tileLayer.wms("http://mapious.ceoas.oregonstate.edu/geoserver/baldricg_atlas/wms", {
layers: 'baldricg_atlas:oregon_cover_white',
format: 'image/png',
minZoom: 6,
maxZoom: 15,
transparent: true,
}).addTo(map);
oregonCover.setOpacity(0.1);
var mini = new L.tileLayer('http://{s}.basemaps.cartocdn.com/light_all/{z}/{x}/{y}.png', {
attribution: '© <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a> © <a href="http://cartodb.com/attributions">CartoDB</a>',
subdomains: 'abcd',
maxZoom: 8,
minZoom: 5
});
var currentZoom = 0;
var miniMap = new L.Control.MiniMap(mini, { toggleDisplay: false});
miniMap.addTo(map);
new L.Control.Zoom({ position: 'bottomright'}).addTo(map);
/*if (scene == 'portland'){
miniMap;
}*/
return map;
}
});
document.getElementsByClassName("leaflet-control-attribution")[0].style.visibility = "hidden";
$(document).on('click', '[data-toggle="lightbox"]', function(event) {
event.preventDefault();
$(this).ekkoLightbox();
});
</script>
</body>
</html>