mapbox / mapbox/sphericalmercator

Test of sm.px()

Open
#22 1 comment 0 reactions 0 assignees View on GitHub

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]
![longitude vs px](https://cloud.githubusercontent.com/assets/1522494/16941486/01065820-4dc3-11e6-9dc8-955e32991bbc.png)

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]
![latitude vs px](https://cloud.githubusercontent.com/assets/1522494/16941563/7c14ef68-4dc3-11e6-9074-c8a9d30e8e8d.png)

Problem: When the latitude is in the range of [85, 95], the px should be fixed to zero.

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 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.