Panning constraints not working as expected on a huge screen
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 12.4k
- Forks
- 2.4k
- PR merge metrics
- No merged PRs in 30d
Description
Hi,
I'm using mapbox-gl on a high resolution ultra-wall. Panning does not work as expected in some scenarios in v0.48.0
Case 1:

This seems to work fine. Only horizontal panning is present.
Case 2:

In this case, after resizing slightly, the topmost part of Greenland gets cut and I can't pan upwards as well.
This issue gets worse, if I resize to the entire size of the wall [14380 x 4015]

I can't pan upwards at all, to see the upper part of Africa. Ideally, I would want to see the same as Case 3 below.
Case 3:
If I instantiate mapbox to the entire size of the wall, at the beginning, without trying to resize, then it seems to work fine.

My guess is that something is glitchy after resizing.
Here is my setup [if it helps]
this.mapboxElement = new mapboxgl.Map({
container: 'map_' + this.id,
style: 'mapbox://styles/mapbox/streets-v9',
maxZoom: 10,
minZoom: 1
});
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 three resizing scenarios with mapbox-gl v0.48.0 using the shown Map constructor, especially the 14380 × 4015 wall size. Compare panning constraints after resizing with constraints when the map is initialized at its final size. Done means the upper map areas remain reachable after resizing without breaking the expected horizontal constraints.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100