46 lines
1.4 KiB
HTML
46 lines
1.4 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<title>Leaflet.heat demo</title>
|
|
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet/v0.7.7/leaflet.css" />
|
|
<script src="http://cdn.leafletjs.com/leaflet/v0.7.7/leaflet.js"></script>
|
|
<style>
|
|
#map { width: 1024px; height: 768px; }
|
|
body { font: 16px/1.4 "Helvetica Neue", Arial, sans-serif; }
|
|
.ghbtns { position: relative; top: 4px; margin-left: 5px; }
|
|
a { color: #0077ff; }
|
|
</style>
|
|
</head>
|
|
<body>
|
|
|
|
<div id="map"></div>
|
|
|
|
<!-- <script src="../node_modules/simpleheat/simpleheat.js"></script>
|
|
<script src="../src/HeatLayer.js"></script> -->
|
|
|
|
<script src="https://rawgit.com/Leaflet/Leaflet.heat/gh-pages/dist/leaflet-heat.js"></script>
|
|
|
|
<script src="./heat_data.js"></script>
|
|
<script>
|
|
var options = {maxZoom:22};
|
|
var map = L.map('map', options).setView(coords[0], 17);
|
|
L.control.scale().addTo(map);
|
|
var tiles = L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', {
|
|
attribution: '© <a href="http://osm.org/copyright">OpenStreetMap</a> contributors',
|
|
}).addTo(map);
|
|
|
|
function addHeat(coords){
|
|
var heat = L.heatLayer(coords).addTo(map);
|
|
}
|
|
//coords = coords.map(function (p) { return [p[1], p[0], 0.05]; });
|
|
|
|
//var heat = L.heatLayer(coords).addTo(map);
|
|
addHeat(coords);
|
|
</script>
|
|
<!--script src="./coord.js"></script>
|
|
<script>
|
|
//addHeat(coords);
|
|
</script-->
|
|
</body>
|
|
</html>
|