-
-
Notifications
You must be signed in to change notification settings - Fork 404
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
Support xyzservices TileProvider objects in hv.Tiles #5057
Comments
Thanks @martinfleis for the suggestion! Interestingly enough, @jbednar @philippjfr and myself recently discovered It is good to have an issue opened though and from what I remember, we were thinking that Suggestion 2 would be a bigger effort that I think we should consider (especially as we recently had issues with the wikipedia tile source no longer being public available). While that might need some discussion, I don't think anyone will object to suggestion 1 right now. If you are willing to make a PR on HoloViews implementing suggestion 1, that would be much appreciated! My only request would be that this is coordinated with a corresponding PR in GeoViews (as we want to maintain a consistent API between the two projects). |
@jlstevens Cool. I'll prepare PRs to implement suggestion 1, mostly mirroring the implementation in folium (python-visualization/folium#1498) which does not even import |
That sounds ideal, thanks! |
I think this can be closed since the HoloViews PR has already been merged. GeoViews one is added here holoviz/geoviews#654 |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Is your feature request related to a problem? Please describe.
With the @geopandas team, we have built a new package called
xyzservices
to serve as a unified place for XYZ tile management. The idea behind this is that other packages will depend on that instead of having their own system and list of supported tiles hard-coded. It would be great to have holoviews on board with the idea, either by supportingxyzservices.TileProvider
as an input ofhv.Tiles
or even refactoringtiles.py
module to depend directly onxyzservices
.xyzservices
itself does not have any dependencies which makes it a non-problematic dependency.It is worth mentioning that
xyzservices
stores providers' metadata in JSON undershare
, accessible for anyone if you have a use case for that.I am happy to do any changes in
xyzservices
needed to make it as useful for you as possible if that allows centralising maintenance of providers in one place.Describe the solution you'd like
TileProvider
as an input ofhv.Tiles
.All the info
Tiles
require can be fetched from theTileProvider
object under the hood.You can remove a big chunk of the maintenance burden by refactoring tile management in
tiles.py
usingxyzservices
directly. In the first step, you can remove all metadata and simply map your existing classes to TileProvider objects. In the second, you can even dynamically support the wholexyzservices
library of providers instead of the pre-defined set you have now.Describe alternatives you've considered
I know that 2) may sound like a bit ambitious proposal but 1) is pretty straightforward to implement already. So I'd say that having at least the first part would be nice.
Additional context
Support of
xyzservices
is being implemented across the ecosystem, from geopandas' own packages (new built-in foilum-based plotting andcontextily
) toleafmap
(opengeos/leafmap#91) andipyleaflet
(jupyter-widgets/ipyleaflet#854) (+ hopefully more).If there's anything we would need to implement in
xyzservices
to make all this work, I am all ears.It seems that @philippjfr would welcome that :).
The text was updated successfully, but these errors were encountered: