-
Notifications
You must be signed in to change notification settings - Fork 34
/
demo-gsc.html
107 lines (103 loc) · 3.41 KB
/
demo-gsc.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width,initial-scale=1" />
<title>GSC Demo - Canadian Geospatial Platform Viewer</title>
<link rel="shortcut icon" href="./favicon.ico" />
<meta name="msapplication-TileColor" content="#da532c" />
<meta name="msapplication-config" content="./img/browserconfig.xml" />
<meta name="theme-color" content="#ffffff" />
<meta name="msapplication-TileColor" content="#da532c" />
<meta name="theme-color" content="#ffffff" />
<link href="https://fonts.googleapis.com/css?family=Roboto|Montserrat:200,300,400,900|Merriweather" rel="stylesheet" />
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons" />
<link rel="stylesheet" href="css/style.css" />
</head>
<body>
<div class="header-table">
<table>
<tbody>
<tr>
<td><img class="header-logo" alt="logo" src="./img/Logo.png" /></td>
<td class="header-title">
<h1><strong>GSC Demo</strong></h1>
</td>
</tr>
<tr>
<td><a href="./demos.html">Main</a><br /></td>
</tr>
</tbody>
</table>
<table>
<tbody>
<tr>
<td><p>Demonstration of Open Science Data Portal - Air Quality in GeoView</p></td>
</tr>
</tbody>
</table>
</div>
<div class="map-title-holder">
<h4 id="HMap1">GSC Demo</h4>
</div>
<button class="collapsible active">Map Status Flags</button>
<pre id="HMap1-state" class="panel map-title-holder"></pre>
<div
id="Map1"
class="geoview-map"
data-lang="en"
data-config="{
'map': {
'interaction': 'dynamic',
'viewSettings': {
'projection': 3978,
'initialView': { 'zoomAndCenter': [10, [-87, 65.7]]}
},
'basemapOptions': {
'basemapId': 'transport',
'shaded': true,
'labeled': true
},
'listOfGeoviewLayerConfig': [
{
'geoviewLayerId': 'geoJsonSample',
'geoviewLayerName': 'JSON Layer',
'metadataAccessPath': './datasets/geojson/46E.JSON',
'geoviewLayerType': 'GeoJSON',
'listOfLayerEntryConfig': [
{
'layerId': '46E.JSON',
'layerName': '46E'
}
]
}
]
},
'components': ['north-arrow', 'overview-map'],
'overviewMap': {'hideOnZoom': 6},
'footerBar': {
'tabs': {
'core': ['legend', 'layers', 'details', 'data-table']
}
},
'corePackages': [],
'theme': 'geo.ca'
}"
></div>
<script src="codedoc.js"></script>
<script src="layerlib.js"></script>
<script>
// initialize cgpv and api events, a callback is optional, used if calling api's after the rendering is ready
cgpv.init((mapId) => {
if (mapId === 'Map1') {
listenToLegendLayerSetChanges('HMap1-state', 'Map1');
}
});
// create snippets
window.addEventListener('load', () => {
createCodeSnippet();
createConfigSnippet();
});
</script>
</body>
</html>