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

Handle |latitude| > 85.05113 in ImageSource #4574

Merged
merged 1 commit into from
Apr 11, 2017
Merged

Handle |latitude| > 85.05113 in ImageSource #4574

merged 1 commit into from
Apr 11, 2017

Conversation

anandthakker
Copy link
Contributor

@anandthakker anandthakker commented Apr 11, 2017

Closes #4573

The issue here was that util.getCoordinatesCenter, in addition to finding the center of the given coordinates on the x-y plane, also attempts to choose the largest zoom level where one tile would cover the area spanned by the given points. Since latitudes outside of [-85.05113, 85.05113] don't fit even on z0, we would get a negative zoom value, which later violated assertions in TileCoord()

Closes #4573

The issue here was that `util.getCoordinatesCenter`, in addition to
finding the center of the given coordinates on the x-y plane, also
attempts to choose the largest zoom level where one tile would cover
the area spanned by the given points.  Since latitudes outside of
[-85.05113, 85.05113] don't fit even on z0, we would get a negative
zoom value.
@anandthakker anandthakker merged commit 469bc38 into master Apr 11, 2017
@anandthakker anandthakker deleted the fix-4573 branch April 11, 2017 20:55
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.

2 participants