Back to Deck Gl

or

examples/get-started/react/mapbox/README.md

9.3.2747 B
Original Source

Example: Use deck.gl with react-map-gl and Mapbox

Uses Vite to bundle and serve files.

Usage

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.jsx.

Other options can be found at using with Mapbox GL.

To install dependencies:

bash
npm install
# or
yarn

Commands:

  • npm start is the development target, to serve the app and hot reload.
  • npm run build is the production target, to create the final bundle and write to disk.