-
Notifications
You must be signed in to change notification settings - Fork 80
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
ENH: Handle minimum / maximum zoom limit for known providers #67
Comments
I think this is related to https://github.com/darribas/contextily/issues/10. We want to have more complete list of providers, but also objects that contain more information than only the url (so eg also the attribution, max zoom level etc). Once we have that, we should indeed use that here to prevent this from happening. See also https://github.com/darribas/contextily/pull/66 for an initial to start to get this information from leaflet-providers.js. |
_calculate_zoom
With #66 in, this should now be an straightforward enhancement, as the provider dicts have an optional min_zoom and max_zoom keys which can be checked. |
Hey there, I was taking a look in the issues to see if there is something I could help with. I forked this repo and clone to my machine. |
Just to mention that I could run the tests with pytest. |
Hello @FelipeSBarros, thanks very much for the interest and work! You're right, we don't use contextily/.github/workflows/tests.yaml Line 46 in 72c85a1
Note you'll need the dev requirements (Python 3.7, and Python 3.8 and beyond). |
using automatic zoom in
bounds2img
for a small area results in high zoom level values that exceeds the available zoom levels of the provider, and rises HTTPError:It would be great to clip the zoom level to a
max_zoom
property for the known providers (18 for stamen, 19 for OSM).The text was updated successfully, but these errors were encountered: