Back to Deck Gl

or

examples/website/terrain/README.md

9.3.2848 B
Original Source

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

Usage

Copy the content of this folder to your project.

To load the terrain tiles, 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.tsx.

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

Data format

Mapbox's terrain API encodes elevation data in raster tiles.

To use other data sources, check out the documentation of TerrainLayer.