-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
48 lines (42 loc) · 1.22 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
<!DOCTYPE html>
<html lang="en">
<head>
<title>DrupalCon Europe 2020 - Photo Mosiac</title>
<meta charset="utf-8" />
<link
rel="stylesheet"
href="https://unpkg.com/[email protected]/dist/leaflet.css"
integrity="sha512-xodZBNTC5n17Xt2atTPuE1HxjVMSvLVW9ocqUKLsCC5CXdbqCmblAshOMAS6/keqq/sMZMZ19scR4PsZChSR7A=="
crossorigin=""
/>
<style>
body {
margin: 0;
}
</style>
</head>
<body>
<div id="map" style="width: 100vw; height: 100vh;"></div>
<script
src="https://unpkg.com/[email protected]/dist/leaflet.js"
integrity="sha512-XQoYMqMTK8LvdxXYG3nZ448hOEQiglfqkJs1NOQV44cWnUrBc8PkAOcXy20w0vlaXaVUearIOBhiXZ5V3ynxwA=="
crossorigin=""
></script>
<script>
var map = L.map("map", {
maxZoom: 8,
minZoom: 3,
crs: L.CRS.Simple
}).setView([37, 37], 3);
var southWest = map.unproject([0, 18256], map.getMaxZoom());
var northEast = map.unproject([18256, 0], map.getMaxZoom());
L.tileLayer("layers/{z}/map_{x}_{y}.jpg", {
bounds: [
[0, 0],
[-74, 74]
]
}).addTo(map);
map.setMaxBounds(new L.LatLngBounds(southWest, northEast));
</script>
</body>
</html>