mapbox / mapbox/mapbox-gl-js

Circles at extreme latitudes are not clamped but mirrored, and sometimes omitted

Open
#8,201 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug :lady_beetle:
Dominant language
TypeScript
Stars
12.4k
Forks
2.4k
PR merge metrics
No merged PRs in 30d

Description

**mapbox-gl-js version**:
0.53.0
**browser**:
Chrome
### Steps to Trigger Behavior

1. Add a source with points of latitude < -85.05 , or > 90
2. Style source with circle layer

### Link to Demonstration
https://jsfiddle.net/83m0L5hn/1/

This demo renders points at longitudes from 0 to 240, at intervals of 10. Red points have latitudes equal to longitude, and blue points have latitudes negative of longitude.

Screen Shot 2019-04-25 at 5 36 00 PM

### Expected Behavior
Circles render properly at up til latitudes +/- 85.05, at which point they get clamped at that value.

### Actual Behavior
Circles past +/-90 latitude start approaching the equator again, as if mirroring from the top and bottom edges of the projection. In addition, extreme southerly points are omitted entirely (missing blue dot at very bottom)

cc/ @ryanhamley @mourner

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

Start by reproducing the behavior with the linked JSFiddle in Chrome using mapbox-gl-js 0.53.0. Trace how circle layers handle points beyond ±85.05 latitude, then verify that extreme points are clamped rather than mirrored or omitted and that the reproduction renders as expected.

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
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.