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 Stadia tiles #20

Closed
geofurb opened this issue May 20, 2021 · 4 comments
Closed

Add Stadia tiles #20

geofurb opened this issue May 20, 2021 · 4 comments

Comments

@geofurb
Copy link

geofurb commented May 20, 2021

Leaflet has a few Stadia tiles that don't seem to work by passing the URL to Contextily.

http://leaflet-extras.github.io/leaflet-providers/preview/#filter=Stadia.AlidadeSmooth
http://leaflet-extras.github.io/leaflet-providers/preview/#filter=Stadia.AlidadeSmoothDark
http://leaflet-extras.github.io/leaflet-providers/preview/#filter=Stadia.OSMBright
http://leaflet-extras.github.io/leaflet-providers/preview/#filter=Stadia.Outdoors

Not sure what the incompatibility is. I get PIL.UnidentifiedImageError: cannot identify image file <_io.BytesIO object at 0x000001E410D79630> when trying the URLs in bounds2img.

@martinfleis martinfleis transferred this issue from geopandas/contextily May 25, 2021
@martinfleis
Copy link
Member

@geofurb providers management is moving to a separate package, I have transferred the issue.

We have recently fetched new providers from leaflet, so these mentioned here are part of the current package offered by xyzervices and will be available in the next release of contextily as well.

@martinfleis
Copy link
Member

The loading issue seems to be due to some restrictions on Stadia side. If you try to access the tile directly (e.g. https://tiles.stadiamaps.com/tiles/alidade_smooth/7/60/38.png), you get error 403 Forbidden even without contextily being involved. You can normally load the tile this way with no issue. I don't really understand how come it works in the leaflet presentation.

@martinfleis
Copy link
Member

Just FYI, Stadia maps may or may not require an access token - https://docs.stadiamaps.com/#api-keys. It seems that within folium/leaflet, tiles will work but within contextily they won't.

@martinfleis
Copy link
Member

Stadia tiles are now part of the leaflet-based JSON.

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

No branches or pull requests

2 participants