-
Notifications
You must be signed in to change notification settings - Fork 3
/
index.html
41 lines (33 loc) · 1.57 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<!DOCTYPE html>
<html>
<head>
<title>Quick Start - Leaflet</title>
<meta charset="utf-8">
<meta content="width=device-width, initial-scale=1.0" name="viewport">
<link href="docs/images/favicon.ico" rel="shortcut icon" type="image/x-icon">
<link href="https://unpkg.com/[email protected]/dist/leaflet.css" rel="stylesheet">
<script src="https://unpkg.com/[email protected]/dist/leaflet.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/leaflet-hash/0.2.1/leaflet-hash.min.js"></script>
</head>
<body>
<div id="mapid" style="width: 800px; height: 600px;"></div>
<script>
var mymap = L.map('mapid').setView([15, -60], 4);
var hash = new L.Hash(mymap);
// comment to restart the build
L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
maxZoom: 19,
}).addTo(mymap);
var loss = L.tileLayer('http://localhost:9000/v1/true-color-tiles/loss/{z}/{x}/{y}?thresh=75&startYear=2010&endYear=2016', {
maxZoom:19
})
var glad = L.tileLayer('http://localhost:9000/v1/true-color-tiles/glad/{z}/{x}/{y}', {
maxZoom:19
}).addTo(mymap)
L.control.layers({'Loss': loss,
'GLAD': glad}, null).addTo(mymap);
var aoi = {"type":"FeatureCollection","features":[{"geometry":{"coordinates":[[[-69.9609375,-13.068776734357689],[-69.9609375,-12.983147716796571],[-69.873046875,-12.983147716796571],[-69.873046875,-13.068776734357689],[-69.9609375,-13.068776734357689]]],"type":"Polygon"},"properties":{"title":"XYZ tile (1252, 2197, 12)"},"type":"Feature"}]}
L.geoJSON(aoi).addTo(mymap);
</script>
</body>
</html>