deck.gl and Mapbox GL JS: Better Together
deck.gl, Uber’s large-scale WebGL-powered data visualization framework, and Mapbox GL JS are frequently used together to create compelling geospatial visualizations. deck.gl’s MapView is designed to work in tandem with Mapbox basemaps — the same camera settings (center, zoom, pitch, and bearing) in both libraries will produce seamlessly matched results. We use Mapbox as a backdrop for deck.gl’s visualization layers in nearly all of Uber’s geospatial data applications.
Mapbox GL JS’s latest release (v0.50) enables third-party layers to draw into the same WebGL context that a Mapbox map is rendered in. This opens many new possibilities for even more tightly integrated geospatial visualizations. For example, a deck.gl GeoJSON layer can be inserted in between Mapbox’s base geographic and label layers, so that filled polygons no longer cover up the map labels. deck.gl’s arc layer and Mapbox’s buildings layer may cohabit the airspace of a city, with 3D elements correctly obscuring each other.
We are excited to announce that deck.gl is supporting these scenarios on day zero with release v6.2 by adding a new module, @deck.gl/mapbox, to the Uber data visualization family.

Getting Started
The new experimental class, MapboxLayer, is an implementation of Mapbox GL JS’s custom layer interface. It can be imported either via the npm module:
npm install @deck.gl/mapboximport {MapboxLayer} from ‘@deck.gl/mapbox’;Or the deck.gl standalone bundle:
<script src=”https://unpkg.com/deck.gl@^6.2.0/deckgl.min.js"></script>
<script src=’https://api.tiles.mapbox.com/mapbox-gl-js/v0.50.0/mapbox-gl.js'></script>
<script type=”text/javascript”>
const {MapboxLayer} = deck;
</script>Instances of MapboxLayer can be added to Mapbox’s layer stack using map.addLayer(). The class constructor comes with two flavors, one for Mapbox developers and one for deck.gl developers.
Using deck.gl layers as a Mapbox add-on
You may make a MapboxLayer using any layer type from deck.gl’s layer catalog and its corresponding props:






