-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
40 lines (38 loc) · 1.72 KB
/
index.html
File metadata and controls
40 lines (38 loc) · 1.72 KB
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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Chernarus+ | Imagery |Satellite</title>
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.9.4/dist/leaflet.css"/>
<script src="https://unpkg.com/leaflet@1.9.4/dist/leaflet.js" ></script>
<style>html, body {height: 100%;margin: 0;padding: 0;}</style>
</head>
<body>
<h1>Tile Dataset</h1>
<p>Click on a tile to view/download:</p>
<ul id="tile-list"></ul>
<script>
fetch("tiles_imagery.json")
.then(response => response.json())
.then(tiles => {
const list = document.getElementById("tile-list");
tiles.forEach(tile => {
const listItem = document.createElement("li");
const link = document.createElement("a");
link.href = `tiles/${tile}`;
link.textContent = tile;
listItem.appendChild(link);
list.appendChild(listItem);
});
})
.catch(error => console.error("Error loading tile list:", error));
</script>
<div id="myMap" style="width:100%;height:100%"></div>
<script type="text/javascript">
var map = L.map('myMap', {crs: L.CRS.Simple,minZoom: 1, maxZoom:5, maxNativeZoom:5});
var tile = {tileSize: L.point(256, 256)};
L.tileLayer('{z}/{x}/{y}.png', tile).addTo(map)
map.setView([-128, 128], 1);
</script>
</body>
</html>