Getting started with Leaflet
Example using map tiles from Stamen
Built with blockbuilder.org
forked from almccon's block: Leaflet starter
forked from almccon's block: Leaflet starter (Toner basemap)
license: mit |
Getting started with Leaflet
Example using map tiles from Stamen
Built with blockbuilder.org
forked from almccon's block: Leaflet starter
forked from almccon's block: Leaflet starter (Toner basemap)
<!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 © Esri — Source: Esri, DeLorme, NAVTEQ, USGS, Intermap, iPC, NRCAN, Esri Japan, METI, Esri China (Hong Kong), Esri (Thailand), TomTom, 2012' | |
}).addTo(mapvariable); | |
</script> | |
</body> |