-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhexagon-example.html
More file actions
83 lines (79 loc) · 1.96 KB
/
hexagon-example.html
File metadata and controls
83 lines (79 loc) · 1.96 KB
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<title>pydeck</title>
<script src="https://api.tiles.mapbox.com/mapbox-gl-js/v1.13.0/mapbox-gl.js"></script>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap-theme.min.css" />
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" />
<script src='https://cdn.jsdelivr.net/npm/@deck.gl/jupyter-widget@~8.8.*/dist/index.js'></script>
<style>
body {
margin: 0;
padding: 0;
overflow: hidden;
}
#deck-container {
width: 100vw;
height: 100vh;
}
#deck-container canvas {
z-index: 1;
background: none;
}
</style>
</head>
<body>
<div id="deck-container">
</div>
</body>
<script>
const container = document.getElementById('deck-container');
const jsonInput = {
"initialViewState": {
"bearing": -27.36,
"latitude": 52.2323,
"longitude": -1.415,
"maxZoom": 15,
"minZoom": 5,
"pitch": 40.5,
"zoom": 6
},
"layers": [
{
"@@type": "HexagonLayer",
"autoHighlight": true,
"coverage": 1,
"data": "https://raw.githubusercontent.com/visgl/deck.gl-data/master/examples/3d-heatmap/heatmap-data.csv",
"elevationRange": [
0,
3000
],
"elevationScale": 50,
"extruded": true,
"getPosition": "@@=[lng, lat]",
"id": "050355de-16ac-400e-be25-b532b24f2898",
"pickable": true
}
],
"mapProvider": "carto",
"mapStyle": "https://basemaps.cartocdn.com/gl/dark-matter-gl-style/style.json",
"views": [
{
"@@type": "MapView",
"controller": true
}
]
};
const tooltip = true;
const customLibraries = null;
const configuration = null;
const deckInstance = createDeck({
container,
jsonInput,
tooltip,
customLibraries,
configuration
});
</script>
</html>