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

Change default zoom_level on Matplotlib's WMTS #685

Merged
merged 3 commits into from
Oct 31, 2023
Merged

Change default zoom_level on Matplotlib's WMTS #685

merged 3 commits into from
Oct 31, 2023

Conversation

ahuang11
Copy link
Collaborator

@ahuang11 ahuang11 commented Oct 31, 2023

If users ran gvts.OSM() on a global extent with the original zoom=8, it'll fetch many many tiles, and probably gets the user rate limited.

I tried to use the utils.zoom_level to auto determine zoom, but I couldn't find a way to extract the bounds from WMTS.

import geoviews as gv
from geoviews import opts, tile_sources as gvts

gv.extension('matplotlib')

gvts.OSM()
image

geoviews/util.py Outdated Show resolved Hide resolved
@ahuang11 ahuang11 requested a review from hoxbro October 31, 2023 15:09
@hoxbro
Copy link
Member

hoxbro commented Oct 31, 2023

As one of those people who were hit by an API limit, this is very much appreciated.

@hoxbro hoxbro changed the title Fix mpl wmts Change default zoom_level on Matplotlib's WMTS Oct 31, 2023
@hoxbro hoxbro merged commit f0bd2ea into main Oct 31, 2023
9 checks passed
@hoxbro hoxbro deleted the fix_mpl_wmts branch October 31, 2023 17:28
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