mapbox / mapbox/mapbox-gl-js

Line corners cut off when creating line border outside polygon

Open
#9,002 4 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

mapbox-gl-js version: 1.5.0

browser: Chrome

Steps to Trigger Behavior
  1. Create a line layer using a polygon source which includes polygons with 'sharp' angles
  2. Add some thickness to the border and an offset (optional)
  3. Set the join type to miter
Link to Demonstration
Screenshot 2019-11-20 at 13 07 59
Expected Behavior

Line should provide a continuous border around the polygons regardless of geometry.

Actual Behavior

Line cuts off where there are sharp angles on polygons.

Note: we're using this behaviour because we can't change the border thickness on a fill type - so we're using a line layer around polygons to create the effect.

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

Reproduce the issue in Chrome with a polygon source, a thick offset line layer, and miter joins, using the steps and screenshot in the report. Investigate the line-layer rendering path for sharp polygon angles; done means the border remains continuous around the polygons without cut-off corners.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
computer-graphics, frontend
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.