mapbox / mapbox/mapbox-gl-js

I hope that for each polygonal data annotation, only one label appears per feature.

Open
#13,024 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

auto-triaged feature :green_apple:
Dominant language
TypeScript
Stars
12.4k
Forks
2.4k
PR merge metrics
No merged PRs in 30d

Description

**mapbox-gl-js version**:2.15.0

### Question
When I use polygonal data for labeling, I find that the labeling positions are split into multiple labels due to tile cutting. However, I expect only one label to appear for each polygon. Is there a solution to this issue?

As shown in the following image, the area is split into multiple tiles, resulting in multiple labels.

![image](https://github.com/mapbox/mapbox-gl-js/assets/49504688/80e59505-5a59-4b92-b4c9-9252295f6a73)

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

No files, tests, or entry points are named. Reproduce the polygon-label behavior using polygonal vector-tile data in mapbox-gl-js 2.15.0, then trace label placement across tile boundaries; done means each polygon displays only one label despite being split between tiles.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.