JSFiddle - React, Tailwind, and code Playground
by designworksinteractive
HTML
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Display HTML clusters with custom properties</title>
<meta name="viewport" content="initial-scale=1,maximum-scale=1,user-scalable=no" />
<script src="https://api.tiles.mapbox.com/mapbox-gl-js/v0.53.1/mapbox-gl.js"></script>
<script src="https://d3js.org/d3.v4.min.js"></script>
<link href="https://api.tiles.mapbox.com/mapbox-gl-js/v0.53.1/mapbox-gl.css" rel="stylesheet" />
<link href="https://api.mapbox.com/mapbox-assembly/v0.23.2/assembly.min.css" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Montserrat" rel="stylesheet">
<style>
body {
margin: 0;
padding: 0;
}
#map {
position: absolute;
top: 0;
bottom: 0;
width: 100%;
}
#key {
background-color: rgba(0, 0, 0, 0.8);
width: 22.22%;
height: auto;
overflow: auto;
position: absolute;
top: 0;
left: 0;
}
.total {
font-family: 'Montserrat', sans-serif;
font-weight: 800;
font-size: 15px;
}
.table {
font-family: 'Montserrat', sans-serif;
color: white;
border-collapse: collapse;
}
</style>
</head>
<body>
<div id="map"></div>
<div id="key"></div>
<script src="https://raw.githubusercontent.com/lobenichou/cluster-properties-mbx/master/global_power_plant_filtered.js"></script>
<script src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/135743/main-v2.js"></script>
</body>
</html>