mapbox / mapbox/mapbox-gl-js

Artifacts on the symbol layer when the window containing the map is moved to a secondary monitor

Open
#13,149 0 comments 1 reaction 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

Hello,

I noticed that the symbol layer on the map exhibits noticeable artifacts/jagged edges that resemble downscaling issues when the window that contains the map is moved to a secondary monitor.

The issue can be repro-ed with the sample page:
https://docs.mapbox.com/mapbox-gl-js/example/add-image/

Open it up on the main (laptop) screen, move it to secondary.

The main screen in my case is a 16" MBP (M2 Pro), the secondary screen is an older 1080p benq xl2411z but I've seen the issue on various types of monitors and it seems to also happen on windows laptops. I can repro this in both Safari and Chrome.

Refreshing the window on the secondary screen does not seem to fix the issue which means that any new tab opened on the secondary monitor will have the artifacts.

I tried to enable antialias locally (it's not enabled in the sample) but it does not improve the appearance in this case.

The cat on the main screen:

Screenshot 2024-04-16 at 15 09 13

The cat on the secondary screen:
![Screenshot 2024-04-16 at 15 09 27](https://github.com/mapbox/mapbox-gl-js/assets/131861303/1a534daf-ec59-4ddf-be3c-7c3a4374ce32)

Let me know if I'm doing something wrong or if this is a known issue, I haven't found anything related in the repo.

Thanks!

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 with the linked add-image sample page and reproduce the rendering artifacts by moving the map window between the laptop and secondary monitors in Safari and Chrome. Trace the map's symbol-layer rendering and display-density handling, then confirm the artifacts no longer appear across the reported monitor setups without degrading the main-screen rendering.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.