Skip to content

windpioneers/deck-solidpolygon-terrain-picking

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

deck.gl Terrain + SolidPolygonLayer Demo

Basic React + Vite app showing a TerrainLayer (Mapbox elevation + satellite texture) and a SolidPolygonLayer draped over the terrain using TerrainExtension.

Steps to reproduce

  1. Create .env.local (copy from .env.example) and set your Mapbox token:
    VITE_MAPBOX_TOKEN=pk.your_token_here
    
  2. Install deps & run:
    npm install
    npm run dev
    
  3. Open the printed local URL (usually http://localhost:5173).

Click the orange polygon to see console logs (info.index, info.object). You'll see that the console shows an erroneous pick, with a high index value.

Notes

  • If no token is provided you'll still see a warning and terrain tiles will also fail (they require the same token) – add a valid token for full functionality.
  • Adjust initialViewState or polygonData in src/App.jsx as needed.

About

A demo of picking failing on deck's SolidPolygon layer with terrain extensions installed

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published