Skip to content

Instantly share code, notes, and snippets.

@almccon
Last active January 14, 2017 01:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save almccon/e0c6d4b8c465f09d1b65f2ab33d4af74 to your computer and use it in GitHub Desktop.
Save almccon/e0c6d4b8c465f09d1b65f2ab33d4af74 to your computer and use it in GitHub Desktop.
Leaflet starter (UTM grid basemap)
license: mit
<!DOCTYPE html>
<head>
<meta charset="utf-8">
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet/v0.7.7/leaflet.css" />
<script src="http://cdn.leafletjs.com/leaflet/v0.7.7/leaflet.js"></script>
<style>
body { margin:0;position:fixed;top:0;right:0;bottom:0;left:0; }
#map {
height: 100%;
}
</style>
</head>
<body>
<div id="map"></div>
<script>
var map = L.map('map').setView([37.8, -122.4], 14);
L.tileLayer('http://{s}.tile.stamen.com/utm/{z}/{x}/{y}.png', {
attribution: 'Map tiles by <a href="http://stamen.com">Stamen Design</a>, under <a href="http://creativecommons.org/licenses/by/3.0">CC BY 3.0</a>. Data &copy; <a href="http://openstreetmap.org">OpenStreetMap</a>, under <a href="http://www.openstreetmap.org/copyright">ODbL</a>'
}).addTo(map);
</script>
</body>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment