Back to Deck Gl

or

examples/website/mapbox/README.md

9.3.21.2 KB
Original Source

This is a minimal standalone version of the Mapbox Integration example on deck.gl website.

Note that this example demonstrates using deck.gl as a Mapbox addon. This approach subjects to API and behavior changes in the Mapbox GL JS library. For alternative ways to use deck.gl with Mapbox, visit the project templates in get-started.

Usage

Copy the content of this folder to your project.

To run this example, you need a Mapbox access token. You can either set an environment variable:

bash
export MapboxAccessToken=<mapbox_access_token>

Or set MAPBOX_TOKEN directly in app.js.

Other options can be found at using with Mapbox GL.

bash
# install dependencies
npm install
# or
yarn
# bundle and serve the app with vite
npm start

Data Source

To build your own application with deck.gl as Mapbox custom layers, check out the documentation of @deck.gl/mapbox module