mapbox / mapbox/mapbox-gl-js

The GeoJSON layer exhibits rendering issues at zoom level 25

Open
#13,459 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

needs information :pray:
Dominant language
TypeScript
Stars
12.4k
Forks
2.4k
PR merge metrics
No merged PRs in 30d

Description

**mapbox-gl-js version**: 3.11.0

**browser**: Chrome

### Steps to Trigger Behavior

1. I added a layer using the method map.addLayer, with the source set to GeoJSON, which consists of a collection of point coordinates.
```
map.addSource('geojson', {
type: 'geojson',
data: '/result/origin.geojson'
});

map.addLayer({
id: 'points',
type: 'circle',
source: 'geojson',
paint: {
'circle-color': '#0000FF',
'circle-radius': 10
}
});
```

2. Due to the extremely close proximity of the points (around 0.1 meters apart), they cannot be displayed correctly on the map, whereas they appear normal in QGIS.
3. "The following are the display effects in Mapbox and QGIS, respectively."
QGIS:

![Image](https://github.com/user-attachments/assets/d22b304c-117a-4bfc-8476-cef6ff56baca)

Mapbox:

![Image](https://github.com/user-attachments/assets/684f3a95-0365-41d3-9fff-ea1189b393f8)

How should I resolve this issue?

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 source file or test is named. Start by reproducing the reported GeoJSON point rendering at zoom level 25 in Chrome using map.addSource and map.addLayer, then trace the relevant circle-layer rendering path. Done requires a reproducible fix for closely spaced points and a regression test, but the issue does not define the expected output precisely.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.