-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathleaflet_basic_fullscreen.html
More file actions
48 lines (40 loc) · 1.18 KB
/
leaflet_basic_fullscreen.html
File metadata and controls
48 lines (40 loc) · 1.18 KB
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
41
42
43
44
45
46
47
48
<!DOCTYPE html>
<html>
<head>
<title>Full Screen Leaflet Map</title>
<meta charset="utf-8" />
<!-- include leaflet css -->
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.7/leaflet.css"/>
<!-- include leaflet js -->
<script src="http://cdn.leafletjs.com/leaflet-0.7/leaflet.js"></script>
<style>
body {
padding: 0;
margin: 0;
}
html, body, #map {
height: 100%;
width: 100%;
}
</style>
</head>
<body>
<!-- element that show the map -->
<div id="map"></div>
<script>
// create object map and center at given lat lon and level zoom
// var map = L.map('map').setView([-23.572248, -46.608124], 10);
var map = L.map('map', {
center: [-23.58, -46.55],
zoom: 10
});
// description on footer
mapLink = '<a href="http://openstreetmap.org">OpenStreetMap</a>';
// add layer with map
L.tileLayer('http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
attribution: '© ' + mapLink + ' Contributors',
maxZoom: 20,
}).addTo(map);
</script>
</body>
</html>