Getting started with Leaflet
Built with blockbuilder.org
forked from enjalot's block: WWSD #1: Leaflet starter
forked from almccon's block: Leaflet starter
xxxxxxxxxx
<head>
<meta charset="utf-8">
<link rel="stylesheet" href="https://cdn.leafletjs.com/leaflet/v0.7.7/leaflet.css" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/leaflet/0.7.7/leaflet.min.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], 10);
L.tileLayer('https://server.arcgisonline.com/ArcGIS/rest/services/World_Physical_Map/MapServer/tile/{z}/{y}/{x}', {
attribution: '© <a href="https://osm.org/copyright">OpenStreetMap</a> contributors'
}).addTo(mapvariable);
</script>
</body>
Modified http://cdn.leafletjs.com/leaflet/v0.7.7/leaflet.js to a secure url
https://cdn.leafletjs.com/leaflet/v0.7.7/leaflet.js