Polygon distortions on high zoom levels
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 12.4k
- Forks
- 2.4k
- PR merge metrics
- No merged PRs in 30d
Description
I am facing the following. At high zoom levels (e.g. 24) i see distortions in data loaded as draw elements (using draw.add()). The first image shows the data in QGIS. The second image shows the data in Leaflet. The last image shows the data for mabox-gl-js with mapbox-gl-draw.
The QGIS image has no distortions (desktop app).
The Leaflet setup (also web context) has almost no distortions (default CRS EPSG:3857 used).
The mabox-gl-js/draw setup has quite significant distortions (the polygons are walls of a building). In multiple places lines are misplaced or not straight. This is only happening in some places of the full map. I tried all available projections with lambertConformalConic (with proper center and parallels) giving the best result (the one in the last image), all the others led to more distortion. The data is in CRS4326/WGS84 format.
So the question is if I have reached the maximum precision of mapbox-gl, or if there are other things to try. Also I am not sure if this question might be more suitable to ask in mabox-gl-draw issues.
Thanks for any thoughts.
**mapbox-gl-js version**: 2.15.0
**mapbox-gl-draw**: 1.4.0
**browser**: Chrome version 114.0.5735.198
### Expected Behavior
### 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
The report names no repository file or test entry point. Start by reproducing the distortion with mapbox-gl-js 2.15.0, mapbox-gl-draw 1.4.0, draw.add(), WGS84 data, and zoom level 24, then compare the projection and polygon geometry against the reported images. Done requires identifying whether the distortion is reproducible in mapbox-gl-js or belongs to mapbox-gl-draw, with a focused regression case or a documented limitation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, typescript
- Domain
- computer-graphics, frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100