forked from consbio/Leaflet.ZoomBox
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
27 lines (25 loc) · 1.14 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
<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<title>Leaflet ZoomBox Control</title>
<link rel="stylesheet" href="//cdn.leafletjs.com/leaflet/v1.1.0/leaflet.css" />
<link rel="stylesheet" href="L.Control.ZoomBox.css" />
</head>
<body>
<script src="//cdn.leafletjs.com/leaflet/v1.1.0/leaflet.js"></script>
<script src="L.Control.ZoomBox.js"></script>
<div id="map" style="position: absolute; top: 0; left:0; bottom:0; right: 0;"></div>
<script>
var map = L.map('map').setView([44.07, -118.78], 6);
L.tileLayer('//{s}.tile.stamen.com/toner-lite/{z}/{x}/{y}.png', {
attribution: 'Map tiles by <a href="http://stamen.com">Stamen Design</a>, <a href="http://creativecommons.org/licenses/by/3.0">CC BY 3.0</a> — Map data © <a href="http://openstreetmap.org">OpenStreetMap</a> contributors, <a href="http://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>',
subdomains: 'abcd',
maxZoom: 10,
minZoom: 2
}).addTo(map);
var control = L.control.zoomBox({modal: true});
map.addControl(control);
</script>
</body>
</html>