-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhanoi_air.html
28 lines (23 loc) · 1.34 KB
/
hanoi_air.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
<!DOCTYPE html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<meta property="og:image" content="https://cadasa.github.io/map/hnmap.jpeg" />
<meta property="og:type" content="text/html; charset=UTF-8" />
<meta property="og:url" content="https://cadasa.github.io/map/hanoi_air.html" />
<meta property="og:title" content="Hanoi Air Quality Map" />
</head>
<body>
<div id='map' style='height:760px;' />
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.7.5/leaflet.css" />
<script src="http://cdn.leafletjs.com/leaflet-0.7.5/leaflet.js"></script>
</body>
<script>
var OSM_URL = 'http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png';
var OSM_ATTRIB = '© <a href="http://openstreetmap.org/copyright">OpenStreetMap</a> contributors';
var osmLayer = L.tileLayer(OSM_URL, {attribution: OSM_ATTRIB});
var WAQI_URL = "https://tiles.waqi.info/tiles/usepa-aqi/{z}/{x}/{y}.png?token=da0fce423a2deafd1a4a1f56e5e923a04755b10c";
var WAQI_ATTR = 'Air Quality Tiles © <a href="http://waqi.info">waqi.info</a>';
var waqiLayer = L.tileLayer(WAQI_URL, {attribution: WAQI_ATTR});
var map = L.map('map').setView([16.5, 107.6], 5);
map.addLayer(osmLayer).addLayer(waqiLayer);
</script>