block by almccon c2048c6994fd03a38fcdee431a7f078c

Leaflet starter (new basemap)

Full Screen

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)

index.html

<!DOCTYPE html>
<head>
  <meta charset="utf-8">
  <link rel="stylesheet" href="//cdn.leafletjs.com/leaflet/v0.7.7/leaflet.css" />
   <script src="//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>