-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
27 lines (26 loc) · 964 Bytes
/
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>currentzoom widget</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/leaflet/1.7.1/leaflet.min.css"/>
<script src="https://cdnjs.cloudflare.com/ajax/libs/leaflet/1.7.1/leaflet.js"></script>
<!--just include the widget like this and all leaflet instances in the
webpage will get a zoom information -->
<script src="https://clockworkmicro.github.io/currentzoom.js"></script>
</head>
<body>
<style>body{margin:0;}</style>
<div id="map" style="width:100vw;height:100vh;"></div>
<script>
window.onload = function()
{
var opts = {"zoomSnap":0.1, "zoomDelta": 0.1}
var map = L.map(document.getElementById("map"), opts).setView([ 10, 20 ], 2);
L.tileLayer('https://tile.openstreetmap.org/{z}/{x}/{y}.png').addTo(map);
}
</script>
</body>
</html>