mapbox / mapbox/mapbox-gl-js

line-gap-width produces overlapping lines on acute angles

Open
#7,513 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

This issue was reported in https://github.com/mapbox/mapbox-gl-native/issues/13227 as a cross-platform bug so I'm creating a corresponding JS ticket here.

**mapbox-gl-js version**:
v0.50.0

**browser**:
any

### Steps to Trigger Behavior

1. Add a GeoJSON line with angles less than 90° (it's not clear what exactly the threshold might be)
2. Set `line-gap-width`for the line (the bug seems to occur regardless of the values set for `line-width`, `line-gap-width` and `line-join`)

### Link to Demonstration
https://jsbin.com/sicomij/edit?html,output

### Expected Behavior
Line gap outlines should not intersect at a line join regardless of the join's angle

### Actual Behavior
Line gap outlines do intersect at line joins less than 90°

### Line Join Values
Round
![screen shot 2018-10-30 at 2 48 39 pm](https://user-images.githubusercontent.com/4523080/47752935-2a9b0980-dc53-11e8-8f28-c2ceeae5ebfa.png)

Miter
![screen shot 2018-10-30 at 2 48 48 pm](https://user-images.githubusercontent.com/4523080/47752937-2a9b0980-dc53-11e8-8749-96cd3dfde0e8.png)

Bevel
![screen shot 2018-10-30 at 2 50 27 pm](https://user-images.githubusercontent.com/4523080/47752938-2b33a000-dc53-11e8-9ff3-872ffba7798d.png)

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 JSBin reproduction and inspect the line-gap-width behavior at acute line joins, comparing the round, miter, and bevel cases. Done means gap outlines no longer intersect for angles below 90°; the issue names no repository file or test to run.

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
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.