Full Screen
Last active
May 9, 2017 13:54
-
-
Save viniciusmaeda/38c573f0ee63954852f4989f97b10d55 to your computer and use it in GitHub Desktop.
Leaflet Sample - Full Screen
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!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> | |
<div id="map"></div> | |
<script> | |
// create the object map and center at lat lon and zoom level | |
var map = L.map('map', { | |
center: [-23.58, -46.55], | |
zoom: 10 | |
}); | |
// footer information | |
mapLink = '<a href="http://openstreetmap.org">OpenStreetMap</a>'; | |
// add layer to map object | |
L.tileLayer('http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', { | |
attribution: '© ' + mapLink + ' Contributors', | |
maxZoom: 20, | |
}).addTo(map); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment