Skip to content

Files

Failed to load latest commit information.

Latest commit

 Cannot retrieve latest commit at this time.

History

History

mapbox

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

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:

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:

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.