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

May need to flip row coordinate #1

Open
tomalrussell opened this issue Feb 15, 2018 · 0 comments
Open

May need to flip row coordinate #1

tomalrussell opened this issue Feb 15, 2018 · 0 comments

Comments

@tomalrussell
Copy link

Hi @ekfriis thanks for this, really useful to see a minimal example!

With my mbtiles file and a simple leaflet.js client, I needed to add a line in order to flip the y-coordinate

row = (2 ** zoom) - 1 - row

just before

query = 'SELECT tile_data FROM tiles '\
so that tiles would render in right place.

I'm not sure if this would always be the case, or if it depends on how the mbtiles were generated. See https://gist.github.com/tmcw/4954720 for some discussion of XYZ vs TMS coordinates.

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

No branches or pull requests

1 participant