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 incorrect z coordinate on overzoomed tiles #2868

Closed
drewbo opened this issue Jul 14, 2016 · 1 comment
Closed

Fix incorrect z coordinate on overzoomed tiles #2868

drewbo opened this issue Jul 14, 2016 · 1 comment

Comments

@drewbo
Copy link
Contributor

drewbo commented Jul 14, 2016

mapbox-gl-js version: 0.21.0

When calling querySourceFeatures past the max zoom of the source layer, the tiles returned are not in the viewport. They have the x and y values from the max zoom of the source layer but the z value from the actual zoom level. My recreation relies on some private layers but you can also see the error in the tile boundary calculation (11/328/794 is correct, 11/164/397 has the correct x/y for zoom 10):

screen shot 2016-07-14 at 11 08 03 am

I believe the reparseOverscaled ternary operator is reversed in the TilePyramid; when swapping z and actualZ locally the problem was resolved. I can add a PR but not sure of a good test case

@lucaswoj lucaswoj modified the milestone: Ayacucho Jul 28, 2016
@lucaswoj lucaswoj modified the milestone: Ayacucho Jul 29, 2016
@lucaswoj lucaswoj changed the title Tile coverage calculation grabs wrong tiles past native source zoom Fix incorrect z coordinate on overzoomed tiles Jul 29, 2016
@lucaswoj
Copy link
Contributor

See #1912 for more context

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants