forked from espy/up-maptiles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
leaflet.html
31 lines (31 loc) · 935 Bytes
/
leaflet.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
<!DOCTYPE html>
<html>
<head>
<title>up</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.6/leaflet.css" />
<script src="http://cdn.leafletjs.com/leaflet-0.6/leaflet.js"></script>
<script>
function init() {
var bounds = new L.LatLngBounds(
new L.LatLng(46.929649, 9.539910),
new L.LatLng(46.985765, 9.656996));
var map = L.map('map').fitBounds(bounds);
var options = {
minZoom: 11,
maxZoom: 16,
opacity: 1.0,
tms: false
};
L.tileLayer('{z}/{x}/{y}.jpg', options).addTo(map);
}
</script>
<style>
body { margin:0; padding:0; }
#map { position:absolute; top:0; bottom:0; width:100%; }
</style>
</head>
<body onload="init()">
<div id="map"></div>
</body>
</html>