-
Notifications
You must be signed in to change notification settings - Fork 0
/
snow.html
34 lines (29 loc) · 1.13 KB
/
snow.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
<html>
<head>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/leaflet/0.7.7/leaflet.css"/>
<style type="text/css">
#map {
position: absolute;
left: 0;
right: 0;
top: 0;
bottom: 0;
}
</style>
</head>
<body>
<div id="map"></div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/leaflet/0.7.7/leaflet.js" type="text/javascript"></script>
<script type="text/javascript" src="L.SnowLayer.js"></script>
<script type="text/javascript">
var map = new L.Map('map');
// create the tile layer with correct attribution
var osmUrl='http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png';
var osmAttrib='Map data © <a href="http://openstreetmap.org">OpenStreetMap</a> contributors';
var osm = new L.TileLayer(osmUrl, {minZoom: 8, maxZoom: 12, attribution: osmAttrib});
map.setView(new L.LatLng(60.0, 10.0), 9);
map.addLayer(osm);
L.snowLayer({color: 'rgba(255, 255, 255, 1.0)', maxFlakes: 200}).addTo(map);
</script>
</body>
</html>