forked from rwev/leaflet-radar
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
39 lines (30 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
<html lang="en">
<head>
<meta charset ="UTF-8" />
<title>leaflet-radar</title>
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.4.0/dist/leaflet.css"/>
<script src="https://unpkg.com/leaflet@1.4.0/dist/leaflet-src.js"></script>
<link rel="stylesheet" href="src/leaflet-radar.css"></script>
<script src="src/leaflet-radar.js"></script>
</head>
<body style="padding: 0; margin: 0;">
<div style="height: 100%; width: 100%;" id="map"></div>
<script type="text/javascript">
var map = L.map("map").setView([43.37, -116.12], 6);
var osmAttribution =
'Map data © <a href="https://openstreetmap.org">OpenStreetMap</a> contributors';
var leafletRadarAttribution =
'<a href="https://github.com/rwev/leaflet-radar">Radar</a>';
L.tileLayer(
"https://tile-{s}.openstreetmap.fr/hot/{z}/{x}/{y}.png",
{
attribution: [
osmAttribution,
leafletRadarAttribution
].join(" | ")
}
).addTo(map);
L.control.radar({}).addTo(map);
</script>
</body>
</html>