-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
57 lines (57 loc) · 2.66 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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-T3c6CoIi6uLrA9TneNEoa7RxnatzjcDSCmG1MXxSR1GAsXEV/Dwwykc2MPK8M2HN" crossorigin="anonymous">
<link rel="stylesheet" href="./prism.css">
<title>OGC API - Tiles Demo</title>
<link rel="icon" type="image/x-icon" href="3d_emblem_lockup.ico">
<style>
html, body {
margin: 0;
height: 100%;
}
#map {
width: 100%;
height: 50vh;;
}
</style>
</head>
<body>
<div class="container">
<a href="https://github.com/ogcincubator/ogcapi-tiles-demo.git"><img style="position: absolute; top: 0; right: 0; border: 0;" src="https://github.com/opengeospatial/developer-website/blob/master/src/assets/img/forkme_right_darkblue_121621.png?raw=true" alt="Fork me on GitHub"/></a>
<div class="jumbotron jumbotron-fluid">
<div class="container">
<h1 class="display-4">OGC API - Tiles Demo</h1>
<p class="lead">This map shows a bunch of OGC API - Tiles layers (e.g.: map tiles, vector tiles).
They are easily integrated, using the <a href="https://openlayers.org/">OpenLayers</a> library, which supports the <a href="https://docs.ogc.org/is/20-057/20-057.html">standard</a> out-of-the-box
using the <a href="https://openlayers.org/en/latest/apidoc/module-ol_source_OGCMapTile-OGCMapTile.html">OGCMapTile</a>
and <a href="https://openlayers.org/en/latest/apidoc/module-ol_source_OGCVectorTile-OGCVectorTile.html">OGCVectorTile</a> classes (see code sample bellow).
</p>
</div>
</div>
<div id="map"></div>
<div class="overflow-x-scroll">
<pre><code class="language-css">
layers: [
new TileLayer({
source: new OGCMapTile({
url: 'https://maps.gnosis.earth/ogcapi/collections/blueMarble/map/tiles/WebMercatorQuad',
}),
}),
new VectorTileLayer({
source: new OGCVectorTile({
url: 'https://maps.gnosis.earth/ogcapi/collections/NaturalEarth:cultural:' +
'ne_10m_admin_0_countries/tiles/WebMercatorQuad',
format: new MVT(),
})
})
]
</code></pre>
</div>
</div>
<script src="./bundle.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-C6RzsynM9kWDrMNeT87bh95OGNyZPhcTNXj1NW7RuBCsyN/o0jlpcV8Qyq46cDfL" crossorigin="anonymous"></script>
<script src="./prism.js"></script>
</body>
</html>