Première carte avec leaflet
Last active
February 4, 2018 20:52
-
-
Save mastersigat/e4c50f4022716ff41ef79f28d18cfb38 to your computer and use it in GitHub Desktop.
#Leaflet / Première carte
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
license: mit |
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
<html> | |
<head> | |
<title>A Leaflet map!</title> | |
<meta charset="UTF-8"> | |
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.css"/> | |
<script src="http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.js"></script> | |
<style> | |
#map {width: 90%; height:600px; margin: auto; } | |
</style> | |
</head> | |
<body> | |
<div id="map"></div> | |
<script> | |
// Initialiser la carte | |
var map = L.map('map', { | |
center: [48.11, -1.66], | |
zoom: 13 }); | |
// Fond de carte | |
L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png').addTo(map); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment