Skip to content

Instantly share code, notes, and snippets.

@almccon
Last active September 15, 2017 21:18
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/c2048c6994fd03a38fcdee431a7f078c to your computer and use it in GitHub Desktop.
Save almccon/c2048c6994fd03a38fcdee431a7f078c to your computer and use it in GitHub Desktop.
Leaflet starter (new 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; }
#mapdiv {
height: 100%;
}
</style>
</head>
<body>
<div id="mapdiv"></div>
<script>
var mapvariable = L.map('mapdiv').setView([48.75, -122.48], 16);
L.tileLayer('https://server.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer/tile/{z}/{y}/{x}', {
attribution: 'Tiles &copy; Esri &mdash; Source: Esri, DeLorme, NAVTEQ, USGS, Intermap, iPC, NRCAN, Esri Japan, METI, Esri China (Hong Kong), Esri (Thailand), TomTom, 2012'
}).addTo(mapvariable);
</script>
</body>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment