-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdemo.html
35 lines (29 loc) · 946 Bytes
/
demo.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
<!DOCTYPE html>
<html>
<head>
<title>Control MouseScroll Demo</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="leaflet/leaflet.css" />
<link rel="stylesheet" href="L.Control.MouseScroll.css" />
</head>
<body>
<div id="map" style="width: 600px; height: 400px"></div>
<script src="leaflet/leaflet-src.js"></script>
<script src="L.Control.MouseScroll.js"></script>
<script>
var map = L.map("map", {
layers: L.tileLayer("http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png", {
attribution: 'Map data © <a href="http://openstreetmap.org">OpenStreetMap</a> contributors, <a href="http://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>',
maxZoom: 18
}),
center: [51.505, -0.09],
zoom: 3,
minZoom: 2,
maxZoom: 16,
scrollWheelZoom: false
})
map.addControl(new L.Control.MouseScroll())
</script>
</body>
</html>