-
-
Notifications
You must be signed in to change notification settings - Fork 84
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
max_native_zoom
property for Providers
#161
Comments
Somewhat related: https://github.com/leaflet-extras/leaflet-providers/pull/369/files If that PR is merged I suppose I will make a PR against contextily/_providers.py |
What is exactly the difference between |
In leaflet, In leaflet, Basically specifying maxNativeZoom allows you to set a maximum on the zoom level the client requests; then the client knows to auto scale in cases where the state demands a higher zoom level. |
oops made a comment that was meant for a PR in another repo. @jorisvandenbossche does this sound reasonable enough that a PR would be considered? |
Allow for a
max_native_zoom
property in Provider object, which would have the same semantics asmaxNativeZoom
in Leaflet. Honoring this option would require auto-scaling the returned image atmax_native_zoom
to the requested zoom.Implementation seems like it would entail changes in tile.py especially
_validate_zoom
,bounds2img
, and possibly_fetch_tile
. Inbounds2img
and_validate_zoom, logic to track the requested zoom from the caller and the
zto pass to the provider. And it seems reasonable to use
PIL.Image.resizein
bounds2img` while the data are still in a PIL.Image.I am happy to propose a PR, but I'm curious to hear what others may have to think about this idea. I am pretty new to contextily so I'm curious if there might be unintended consequences.
The text was updated successfully, but these errors were encountered: