-
Notifications
You must be signed in to change notification settings - Fork 20
/
demo.html
21 lines (20 loc) · 641 Bytes
/
demo.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<link rel="stylesheet" type="text/css" href="https://unpkg.com/[email protected]/dist/leaflet.css">
<script src="https://unpkg.com/leaflet"></script>
<script src="https://unpkg.com/@joergdietrich/leaflet.terminator"></script>
<style>
#map {
position: absolute;
height: 100vh;
width: 100vw;
top: 0;
left: 0;
}
</style>
<div id="map"></div>
<script>
// var map = L.map('map', { minZoom: 2, maxBounds: [[-85, -350], [85, 350]] }) // to avoid seeing terminator's end
var map = L.map('map') //
.addLayer(L.tileLayer('http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png'))
.setView([0, 0], 1.5);
L.terminator().addTo(map)
</script>