mapbox / mapbox/mapbox-gl-draw
crash after adding a canvas to map (no error thrown)
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 1.1k
- Forks
- 612
- Avg merge
- 8d 9h
- Merged PRs (30d)
- 5
Description
**mapbox-gl-js version**: 0.36.0
**mapbox-gl-draw version**: 0.17.0
### Steps to Trigger Behavior
Add a canvas source like:
```
map.addSource('heatmapsource', {
type: 'canvas',
canvas: 'heatmap-canvas',
animate: true,
coordinates: [
[west, north],
[east, north],
[east, south],
[west, south]
]
});
```
It does not matter if you add it before or after initialising Mapbox Draw
### Expected Behavior
It should work.
### Actual Behavior
It doesn't. All features disappear, when clicking a draw control, the cursor does not even become a crosshair, total f up. No error thrown :-(
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
Reproduce the failure with mapbox-gl-js 0.36.0, mapbox-gl-draw 0.17.0, the canvas source example, and both initialization orders. Compare the map with and without the canvas source, then verify that Draw controls remain usable, features stay visible, and no silent crash occurs.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend, web-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100