mapbox / mapbox/mapbox-gl-js

Throwing javascript runtime error when zoom map

Open
#11,340 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug :lady_beetle: needs investigation :mag:
Dominant language
TypeScript
Stars
12.4k
Forks
2.4k
PR merge metrics
No merged PRs in 30d

Description

**mapbox-gl-js version**: 2.6.1

**browser**: Chorme 72.0.3626.81

### Steps to Trigger Behavior

1. Open demonstration with Chorme 72
2. Change zoom:1 to zoom:4

### Link to Demonstration

https://jsbin.com/yizumugoco/edit?html,css,js,console,output

### Expected Behavior
Compatibility with old version Chrome
### Actual Behavior'
Throwing a javascript runtime error ( Failed to execute 'getImageData' on 'CanvasRenderingContext2D': The source width is 0. ) with old version Chrome

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by running the linked JSBin demonstration in Chrome 72.0.3626.81, change the zoom from 1 to 4, and inspect the console for the CanvasRenderingContext2D getImageData error. Done means changing zoom no longer produces the reported runtime error while preserving compatibility with the stated browser version.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, typescript
Domain
frontend, web-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.