README
#3D Cellular Heat Map
Load the 3D cellular heat map into the map.

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>3D Cellular Heat Map</title>
<meta name="viewport" content="initial-scale=1,maximum-scale=1,user-scalable=no"/>
<style>
body {
margin: 0;
padding: 0;
}
#map {
position: absolute;
top: 0;
bottom: 0;
width: 100%;
}
.btn-group {
position: absolute;
top: 20px;
left: 20px;
}
</style>
<script src="https://delivery.mapmost.com/cdn/sdk/webgl/v9.16.0/mapmost-webgl-min.js"></script>
</head>
<body>
<div id="map"></div>
<div class="btn-group">
<button onClick="removeLayer()">Remove layer</button>
</div>
<script>
var map = new mapmost.Map({
container: 'map',
style: "<your style url>",
center: [120.74281889772737, 31.302367195356567],
zoom: 12,
pitch: 30,
userId: '***', // Authorization code
env3D:{
envMap:'./WhiteBG_Ref_1K.hdr'
}
});
map.on('load', function () {
map.addLayer({
id: 'hexagon-layer', // Load the id of the layer and define the unique identifier of the layer
type: 'hexagon', // Define the type of layer to be loaded. The layer type is `hexagon`
data: '<your data>', // Honeycomb map data, passed in in the form of latitude and longitude, in the form [[lng,lat],[lng,lat],...]
heightMultiplier: 1.5, // Height multiple, default 1
radius: 4, // Cell radius in meters, default 100
coverage: 1, //The coverage rate of each cell group mainly affects the size of a single cell. The value is 0~1, and the default is 0.5.
colorRange: {
0: "#1a9850",
25: "#9fd568",
30: "#ffffbf",
40: "#fd9d62",
45: "#d73027",
}, // Color interval, allocated according to the number of points set
ambientFactor: 0.22,
directionalFactor: 0.1,
})
})
function removeLayer() {
map.removeLayer('hexagon-layer')
}
</script>
</body>
</html>