mapbox / mapbox/mapbox-gl-js

Black outline around globe when padding is applied to the map

Open
#13,565 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

auto-triaged bug :lady_beetle:
Dominant language
TypeScript
Stars
12.4k
Forks
2.4k
PR merge metrics
No merged PRs in 30d

Description

### mapbox-gl-js version

3.15.0

### Browser and version

All browsers

### Expected behavior

The globe should be sized without having a black border around it.

This is how it looks without any map padding:

https://github.com/user-attachments/assets/4805db67-a1ba-43a6-9123-14cf8131e671

### Actual behavior

When changing screen size it makes it much more clear, when padding is applied to the map (for example by doing fitBounds with padding in the options), there is a thick black outline around the globe view.

https://github.com/user-attachments/assets/0fc00bf9-fd0a-44f1-aaf2-c3c741f71885

### Link to the demonstration

_No response_

### Steps to trigger the unexpected behavior

Do map fitBounds with padding, then zoom in from globe view.

### Relevant log output

```shell

```

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 reproducing the issue with map.fitBounds padding, then zoom from globe view while resizing the browser. Trace the globe rendering path to identify the source of the black outline; done means padded globe views render without the border in all browsers.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
computer-graphics, frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.