[Bug] Type issue IconLayer doesn't allow HTMLCanvasElement as iconAtlas
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 14.6k
- Forks
- 2.3k
- Avg merge
- 2d 9h
- Merged PRs (30d)
- 42
Description
Description
Type issue IconLayer doesn't allow HTMLCanvasElement as iconAtlas:
Types of property 'iconAtlas' are incompatible.
Type 'HTMLCanvasElement' is not assignable to type 'string | Texture | undefined'.
Type 'HTMLCanvasElement' is missing the following properties from type 'Texture': dimension, format,
After further investigation I figured out that is because of change in @luma/core.
It still works... just typescript cries.
Flavors
- Script tag
- React
- Python/Jupyter notebook
- MapboxOverlay
- GoogleMapsOverlay
- CARTO
- ArcGIS
Expected Behavior
HTMLCanvasElement allowed.
Steps to Reproduce
Install latest DeckGL and use HTMLCanvasElement (as documentation says) as iconAtlas.
Environment
Doesn't matter.
Logs
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the IconLayer entry point and trace the iconAtlas type through the deck.gl and @luma/core definitions. Reproduce the React TypeScript example using an HTMLCanvasElement, then verify that the documented usage type-checks without errors while existing iconAtlas types remain supported.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- data-visualization, frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100