-
Notifications
You must be signed in to change notification settings - Fork 1
/
moscow_4.html
36 lines (29 loc) · 1.17 KB
/
moscow_4.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
<html>
<head>
<title>Example 4</title>
<meta charset="utf-8">
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.css" />
<script src="http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.js"></script>
<script src="moscow_ice_fields.js"></script>
<script src="http://leaflet.github.io/Leaflet.heat/dist/leaflet-heat.js"></script>
</head>
<body>
<div id="map" style="height: 100%;"> </div>
<script>
var map = L.map('map').setView([55.75, 37.63], 10);
L.tileLayer('https://{s}.tiles.mapbox.com/v3/{id}/{z}/{x}/{y}.png',
{maxZoom: 18,
attribution: 'Map data © <a href="http://openstreetmap.org">OpenStreetMap</a> contributors, ' +
'<a href="http://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, ' +
'Imagery © <a href="http://mapbox.com">Mapbox</a>', id: 'examples.map-i875mjb7'
}).addTo(map);
L.marker([55.75, 37.617]).addTo(map)
.bindPopup('Тут хорошо')
.openPopup();
var heat = L.heatLayer([[iceFields[0].Lat, iceFields[0].Lon]],{radius: 100});
for(var i=1; i<iceFields.length; i++) {
heat.addLatLng([iceFields[i].Lat, iceFields[i].Lon]);
}
heat.addTo(map);
</script>
</body></html>