Skip to content

Instantly share code, notes, and snippets.

@ycombinator
Created July 12, 2016 14:01
Show Gist options
  • Save ycombinator/0cf784565eb9825fc591e40b0ed7d2e9 to your computer and use it in GitHub Desktop.
Save ycombinator/0cf784565eb9825fc591e40b0ed7d2e9 to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet/v0.7.7/leaflet.css" />
<script lang="javascript" src="http://cdn.leafletjs.com/leaflet/v0.7.7/leaflet.js"></script>
<script lang="javascript">
window.onload = function() {
// initialize the map on the "map" div with a given center and zoom
var map = new L.Map('map', {
center: new L.LatLng(51.46, -0.205),
zoom: 15
});
// create a new tile layer
var tileUrl = 'https://{s}.tile.thunderforest.com/cycle/{z}/{x}/{y}.png',
layer = new L.TileLayer(tileUrl, {maxZoom: 18});
// add the layer to the map
map.addLayer(layer);
}
</script>
<body>
<div id="map" style="width: 500px; height: 500px"></div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment