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 new providers in session #12

Open
darribas opened this issue May 21, 2021 · 4 comments
Open

Add new providers in session #12

darribas opened this issue May 21, 2021 · 4 comments
Labels
enhancement New feature or request
Milestone

Comments

@darribas
Copy link
Contributor

Develop a method within a Bunch that can append new TileProvider instances to a loaded set of providers. It should work something like:

import xyzservices.providers as xyz

xyz.add_provider({'url': 'http://myservice/{x}/{y}/{z}'})
@darribas darribas added the enhancement New feature or request label May 21, 2021
@darribas darribas mentioned this issue May 21, 2021
10 tasks
@jorisvandenbossche
Copy link
Member

What would be the goal of this?

If someone wants to define and use a custom TileProvider, they can also do MyProvider = TileProvider(url=..., ...) and then use MyProvider instead of xyz.MyProvider

@martinfleis
Copy link
Member

We want to have a method that expands the existing Bunch from a custom JSON (#14). But if you don't have a JSON you may want to expand it in a different way and keep all providers within a single Bunch instead of having each as an object. It is not aimed so much at the addition of a single TileProvider but more of them. And we may use this under the hood in #14 so no reason not to expose it.

@jorisvandenbossche
Copy link
Member

But also for #14, can you explain why you want to add it to the existing bunch of the package instead of creating a new bunch?

@martinfleis
Copy link
Member

Let's assume that ipyleaflet, geopandas_view or any other package adds an interactive list of available basemaps, similar to what folium has (http://leaflet-extras.github.io/leaflet-providers/preview/), you want to ingest a single bunch from xyzservices. If you also want to add some custom basemaps (like custom CartoDB tiles) you want to append them to the existing bunch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants