block by almccon 6d632572739217d2804fd2d429b9fa23

Leaflet starter

Full Screen

Getting started with Leaflet

Built with blockbuilder.org

forked from enjalot‘s block: WWSD #1: Leaflet starter

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; }
    #map {
      height: 100%;
    }
  </style>
</head>

<body>
  <div id="map"></div>
  <script>
    var map = L.map('map').setView([37, -120], 10);

    L.tileLayer('//{s}.tile.stamen.com/terrain/{z}/{x}/{y}.png', {
        attribution: '&copy; <a href="//osm.org/copyright">OpenStreetMap</a> contributors'
    }).addTo(map);
    
  </script>
</body>