JSFiddle - React, Tailwind, and code Playground
HTML
<!DOCTYPE html>
<html>
<head>
<title>WebGL</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
html, body, #map {
width: 100%;
height: 100%;
margin: 0;
}
</style>
<!-- Leaflet -->
<link rel="stylesheet" href="https://unpkg.com/[email protected]/dist/leaflet.css" />
<script src="https://unpkg.com/[email protected]/dist/leaflet.js"></script>
<!-- Mapbox GL -->
<link href="https://api.tiles.mapbox.com/mapbox-gl-js/v1.2.0/mapbox-gl.css" rel='stylesheet' />
<script src="https://api.tiles.mapbox.com/mapbox-gl-js/v1.2.0/mapbox-gl.js"></script>
</head>
<body>
<div id="map"></div>
<script src="https://unpkg.com/mapbox-gl-leaflet/leaflet-mapbox-gl.js"></script>
<script>
var map = L.map('map').setView([42.45, -83.2], 15);
L.marker([42.45, -83.2])
.bindPopup("Hello <b>Leaflet GL</b>!<br>Whoa, it works!")
.addTo(map)
.openPopup();
//add the labels
var gl_labels = new L.MapboxGL({
accessToken: 'pk.eyJ1Ijoic2VtY29nIiwiYSI6ImlvNEFUcmMifQ.VmDLZZG7l6syscFzkBs5eg',
style: 'mapbox://styles/semcog/cje93r8vr0flv2sqsyzi99oib',
}).addTo(map);
//add an imagery basemap
var gl = L.mapboxGL({
accessToken: 'pk.eyJ1Ijoic2VtY29nIiwiYSI6ImlvNEFUcmMifQ.VmDLZZG7l6syscFzkBs5eg',
style: 'mapbox://styles/semcog/cjpn2nkq42exg2qo56dt8fc33'
}).addTo(map);
</script>
</body>
</html>