-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
40 lines (40 loc) · 1.05 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
<html>
<head>
<link
rel="stylesheet"
href="https://unpkg.com/[email protected]/dist/leaflet.css"
/>
<style>
body {
margin: 0;
padding: 0;
}
#map {
position: absolute;
top: 0;
bottom: 0;
width: 100%;
}
</style>
</head>
<body>
<title>Herat Map Comparison</title>
<script src="https://unpkg.com/[email protected]/dist/leaflet.js"></script>
<script src="https://lab.digital-democracy.org/leaflet-side-by-side/leaflet-side-by-side.js"></script>
<div id="map"></div>
<script>
var mymap = L.map("map").setView([34.348999,62.207849], 14);
var oldMap = L.tileLayer("./old/{z}/{x}/{y}.png", {
attribution: "OSM Contributers",
minZoom: 11,
maxZoom: 18,
}).addTo(mymap);
var newMap = L.tileLayer("./new/{z}/{x}/{y}.png", {
attribution: "OSM Contributers",
minZoom: 11,
maxZoom: 18,
}).addTo(mymap);
L.control.sideBySide(oldMap, newMap).addTo(mymap);
</script>
</body>
</html>