Subject: Symbol labels on vector-tile polygons — collision hiding and cross-tile duplicates
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
v3.1.0
Browser and version
Chrome / Edge (recent). Not browser-specific in our testing.
Expected behavior
Each visible polygon should show one readable label. A polygon clipped across tiles should not produce multiple labels for the same feature.
Actual behavior
We consistently see two problems:
Collision hiding — With default placement (text-allow-overlap: false), many labels disappear in dense areas even when the polygon is visible and zoom constraints are met. Labels flicker in/out while panning.
Cross-tile duplicates — When one polygon spans multiple tiles, the same name often appears 2–4 times near tile boundaries, because placement runs on each tile-clipped geometry fragment.
We also tried text-allow-overlap: true with text-ignore-placement: true and symbol-avoid-edges: false. That shows more labels, but duplicates and overlap get worse. We have not found a satisfactory configuration that addresses both issues.
Steps to reproduce
1.Load a vector source with polygon .pbf tiles.
2.Add fill + symbol layers on the same source-layer.
3.Set 'text-field': ['get', '<name_field>'].
4.Zoom to 16+ and pan across tile boundaries.
5.Observe missing labels (default placement) and/or duplicate labels (overlap enabled).
Link to the demonstration
No response
Steps to trigger the unexpected behavior
No response
Relevant log output
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
Start by reproducing the issue with polygon vector-tile data, fill and symbol layers, and the listed text-placement settings at zoom 16+ while panning across tile boundaries. Compare default collision placement with overlap enabled. Done means each visible polygon has one readable label, including polygons spanning tiles, without flicker or duplicate labels.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- computer-graphics, frontend, web-dev
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100