-
Notifications
You must be signed in to change notification settings - Fork 3
/
tiles.html
42 lines (40 loc) · 1.48 KB
/
tiles.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
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8'>
<meta http-equiv='X-UA-Compatible' content='IE=edge'>
<title>MC Earth</title>
<meta name='viewport' content='width=device-width, initial-scale=1'>
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.7.1/dist/leaflet.css" integrity="sha512-xodZBNTC5n17Xt2atTPuE1HxjVMSvLVW9ocqUKLsCC5CXdbqCmblAshOMAS6/keqq/sMZMZ19scR4PsZChSR7A==" crossorigin=""/>
<script src="https://unpkg.com/leaflet@1.7.1/dist/leaflet.js" integrity="sha512-XQoYMqMTK8LvdxXYG3nZ448hOEQiglfqkJs1NOQV44cWnUrBc8PkAOcXy20w0vlaXaVUearIOBhiXZ5V3ynxwA==" crossorigin=""></script>
<style>
body {
padding: 0;
margin: 0;
}
html, body, #map {
height: 100%;
width: 100%;
}
</style>
</head>
<body>
<div id="map"></div>
<script>
var map = L.map('map');
var normal = L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
attribution: '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
}).addTo(map);
var mcearth = L.tileLayer('https://cdn.mceserv.net/tile/{z}/{x}/{x}_{y}_{z}.png', {
maxNativeZoom: 16,
minNativeZoom: 16,
});
var newearth = L.tileLayer('https://tiles.projectearth.dev/styles/mc-earth/{z}/{x}/{y}.png', {
maxNativeZoom: 16,
minNativeZoom: 16,
})
L.control.layers({"Normal": normal, "MC Earth": mcearth, "Project Earth": newearth}).addTo(map);
map.setView([51.5074, 0.1278], 13);
</script>
</body>
</html>