Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bug calculating image source tile coordinates #4553

Merged
merged 1 commit into from
Apr 6, 2017

Conversation

anandthakker
Copy link
Contributor

Closes #4550

Using Math.round on the centerCoord value here causes a coordinate
like {zoom: 2, column: 1.5, row: 1.5} to become
{zoom: 2, column: 2, row: 2}, which is out of bounds for a z2 tile;
the correct tile for containing those coordinates is {zoom: 2, column: 1, row: 1}

Closes #4550

Using `Math.round` on the `centerCoord` value here causes a coordinate
like `{zoom: 2, column: 1.5, row: 1.5}` to become
`{zoom: 2, column: 2, row: 2}`, which is out of bounds for a z2 tile;
the correct tile for containing those coordinates is `{zoom: 2, column: 1, row: 1}`
@anandthakker anandthakker merged commit 8e8a3d1 into master Apr 6, 2017
@anandthakker anandthakker deleted the fix-image-source branch April 6, 2017 14:55
@jfirebaugh
Copy link
Contributor

Can you add a regression test for this?

anandthakker pushed a commit that referenced this pull request Apr 6, 2017
Accidentally left out of #4553
@anandthakker
Copy link
Contributor Author

@jfirebaugh oops I must have failed to git add it (and then proceeded to lose the local copy 🙄 ). Added in #4554

anandthakker added a commit that referenced this pull request Apr 6, 2017
Accidentally left out of #4553
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants