Created
August 12, 2015 17:46
-
-
Save lxbarth/b7fea92f16b5ba0dd65a to your computer and use it in GitHub Desktop.
Vanilla leaflet
This file contains hidden or 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>Leaflet Quick Start Guide Example</title> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<link rel="stylesheet" href="http://leafletjs.com/dist/leaflet.css"> | |
<style> | |
#map { | |
position: absolute; | |
left: 0; right: 0; top: 0; bottom: 0; | |
} | |
</style | |
</head> | |
<body quick-markup_injected="true" class=""> | |
<div id="map"></div> | |
<script src="http://leafletjs.com/dist/leaflet.js"></script> | |
<script> | |
var map = L.map('map').setView([51.505, -0.09], 13); | |
L.tileLayer('https://api.tiles.mapbox.com/v4/{id}/{z}/{x}/{y}.png?access_token=pk.eyJ1IjoibWFwYm94IiwiYSI6IjZjNmRjNzk3ZmE2MTcwOTEwMGY0MzU3YjUzOWFmNWZhIn0.Y8bhBaUMqFiPrDRW9hieoQ', { | |
maxZoom: 18, | |
attribution: 'Map data © <a href="http://openstreetmap.org">OpenStreetMap</a> contributors, ' + | |
'<a href="http://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, ' + | |
'Imagery © <a href="http://mapbox.com">Mapbox</a>', | |
id: 'mapbox.streets' | |
}).addTo(map); | |
</script> | |
</body></html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment