mapbox / mapbox/sphericalmercator
Test of sm.px()
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 288
- Forks
- 51
- PR merge metrics
- No merged PRs in 30d
Description
I have made a plot with the results of sm.px(). see bellow:
1. zoom=0, latitude=0, longitude=[-360, 360]

Problem: when the longitude is less that -180, the px will decreased continuely. Howerver when the longitude is greater than 180, the px is fixed to 256, which I think should be greater than 256.
1. zoom=0, longitude=0, laitude=[-360, 360]

Problem: When the latitude is in the range of [85, 95], the px should be fixed to zero.
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 by locating the sm.px() entry point and reproduce both reported cases: longitude outside [-180, 180] at zoom 0, and latitude from -360 to 360. Check the existing projection behavior and add or update tests for the expected pixel values, including longitudes above 180 and latitudes in the stated range.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100