After setting the "line-cap" property to "round", adding the "line-dasharray" property to the line layer, and adjusting the "line-width" to a wider width, the line is not smooth and jagged at the cap
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 12.4k
- Forks
- 2.4k
- PR merge metrics
- No merged PRs in 30d
Description
mapbox-gl-js version: v2.9.2
browser: Version 111.0.5563.147 (official version) (64-bit)
### Steps to Trigger Behavior
1. Add a line layer.
2. Set the "line-cap" property to "round", add the "line-dasharray" property to the line layer, adjust the "line-width" to be wider
### Link to Demonstration
https://codepen.io/SuperHuZhiPeng/pen/QWZzRXG
### Expected Behavior
The line-cap should be round and smooth, and should not have serrations.
### Actual Behavior


Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the jagged round cap using the linked CodePen with mapbox-gl-js v2.9.2, a dashed line layer, and a wider line width. Then trace the line-layer rendering path responsible for dashed round caps and compare the rendered result with the expected smooth cap; done means the reproduction is smooth without serrations.
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
- 38/100