mapbox / mapbox/mapbox-gl-js

Lambert projection's unproject is not collect over 180deg (always return 180)

Open
#12,651 0 comments 0 reactions 0 assignees View on GitHub
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**: 2.13.0

**browser**: all

### Steps to Trigger Behavior

1. set projection as 'lambertConformalConic' with center property [140, 50]
2. add mousemove event and got lngLat by event.lngLat.
3. the longitude result between -40 to -180 are always 180 (not collect)

### Link to Demonstration
https://jsfiddle.net/yanoh/cfjaLt0n/
Screen Shot 2023-04-11 at 18 10 13

### Expected Behavior
When the longitude is -40 the result should be -40 as it is.

### Actual Behavior
When the longitude is -40 the result is 180.

Contributor guide

Open the contributing guide

Research direction

Reproduce the behavior using the linked JSFiddle with the lambertConformalConic projection centered at [140, 50], then trace the projection's unproject path triggered by the mousemove event. Done means longitudes such as -40 are returned as -40 rather than 180, with the relevant regression coverage added.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend, web-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 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.