mapbox / mapbox/mapbox-gl-js

Strange rendering artefacts with the line layer

Open
#10,000 9 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Hi guys,

Thank you for this awesome library!

Not sure if it's a bug or just me doing something wrong (probably the latter...), but I am experiencing some weird rendering issues when using the line layer.

At the maximum zoom level the line looks as I would expect it:
![1](https://user-images.githubusercontent.com/30501641/94139669-4ec8ea80-fe6a-11ea-82d7-c37e971d7394.png)

However, when I zoom out I start to get these strange artefacts where my line makes sharp turns:
![2](https://user-images.githubusercontent.com/30501641/94139866-a5362900-fe6a-11ea-97c1-12e73a07a47a.png)

I've tried tweaking various settings and also searched the issues, but no luck. I would really appreciate if somebody could point me in the right direction: to be honest, I am a bit lost now on how to debug/fix this issue.

Thanks in advance!

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

The issue provides screenshots but no reproduction code, file, test, or entry point. Start by reproducing the line-layer rendering artefacts while zooming out, then trace the rendering path used by that layer and compare the output across zoom levels. Done means identifying and correcting the cause and adding a regression test if the existing test structure supports it.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
computer-graphics
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.