Lines not drawn correctly on globe projection
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 using mapbox to render an airplane flight from San Francisco, CA to Dubai. The flight should be rendered using the "shortest direct distance" over the north pole, but is rendered by MapBox GL incorrectly as flying east across the US and over the Atlantic Ocean.
The ideal shortest path is about 7000 nm and the path as displayed is approximately 9200 nm.
**mapbox-gl-js version**: 3.2.0
**browser**: Safari 17.4 (19618.1.15.11.12)
### Steps to Trigger Behavior
1. Draw a line from ``-122.375, 37.61899948120117`` to ``55.3643989563, 25.2527999878``
### Link to Demonstration
https://codepen.io/mrjbq7/pen/JjVEKgm
### 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
Start with the CodePen reproduction and the supplied coordinates in mapbox-gl-js 3.2.0, then trace the globe projection's line-rendering path. Compare the rendered route with the expected shortest direct path over the north pole; done means the line follows that route in the demonstrated case without regressing other globe lines.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, typescript
- Domain
- computer-graphics, frontend, web-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100