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

Add a check for tile coordinate validity #36

Merged
merged 3 commits into from
Sep 11, 2018
Merged

Conversation

iandees
Copy link
Member

@iandees iandees commented Sep 11, 2018

Fixes #35.

Is the helpful message helpful enough?

server.py Outdated
@@ -299,16 +299,23 @@ def retrieve_tile(meta, offset, cache_info):
)


def is_valid_tile_request(z, x, y):
return (0 <= z < 20) and (0 <= x < 2**z) and (0 <= y < 2**z)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We only support zoom 16 max?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, good catch.

@iandees iandees merged commit 67ba358 into master Sep 11, 2018
@iandees iandees deleted the dees/check-valid-tile branch September 11, 2018 20:52
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