-
Notifications
You must be signed in to change notification settings - Fork 8
/
example.html
56 lines (47 loc) · 1.44 KB
/
example.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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Solr Heatmap</title>
<link href="bower_components/leaflet/dist/leaflet.css" rel="stylesheet">
<style>
html, body {
height: 100%;
}
#map {
width: 100%;
height: 100%;
}
</style>
</head>
<body>
<div id="map">
</div>
<!--
Leaflet is the only pre-requisite library.
-->
<script src="bower_components/leaflet/dist/leaflet.js"></script>
<!--
If running from straight sources the canvas layer must be included
-->
<script src="canvas_layer/leaflet_canvas_layer.js"></script>
<script src="heatmap.js"></script>
<!--
If running from production build heatmap.js has canvas layer included
<script src="dist/heatmap.js"></script>
-->
<script>
var map = L.map("map").setView([37.16, -115.07], 5);
L.tileLayer('http://{s}.basemaps.cartocdn.com/dark_nolabels/{z}/{x}/{y}.png', {
attribution: '© <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a> © <a href="http://cartodb.com/attributions">CartoDB</a>',
maxZoom: 19
}).addTo(map);
new L.SolrHeatmapLayer('http://voyagerdemo.com/daily/solr/v0', {
field: 'geohash',
colors: ['ffff00', 'ff0000']
}).addTo(map);
</script>
</body>
</html>