geojupyter / jupytergis

JupyterGIS - Collaborative GIS editor in Jupyter
https://geojupyter.github.io/jupytergis
BSD 3-Clause "New" or "Revised" License
55 stars 11 forks source link

CORS Error When Loading OPNVKarte Basemap #93

Open arjxn-py opened 3 months ago

arjxn-py commented 3 months ago

When attempting to load the OPNVKarte basemap in JupyterGIS, a CORS (Cross-Origin Resource Sharing) error is encountered, preventing the tiles from being fetched and displayed.

Access to fetch at 'https://tileserver.memomaps.de/tilegen/4/11/7.png' from origin 'http://localhost:8888' 
has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.

GET https://tileserver.memomaps.de/tilegen/4/11/7.png net::ERR_FAILED 200 (OK)
arjxn-py commented 3 months ago

Apologies in advance as I know that the project is WIP but one more reason to open this issue is that I'm facing the same problem in arjxn-py/jupytergis#1, see this commit in which i just did a hacky workaround but definitely not for production.

arjxn-py commented 2 months ago

ProxyHandler defined in #104 should come in handy to fix this as well. But since it'd still not work with JupyterLite, would we want to also add a note or warning if we decide to use that upon agreement?

martinRenou commented 2 months ago

I guess that in the case of jupyterlite we can rely on cors-anywhere for now? We could think of making our own deployment of a cors-anywhere-like server

arjxn-py commented 2 months ago

I guess that in the case of jupyterlite we can rely on cors-anywhere for now? We could think of making our own deployment of a cors-anywhere-like server

Oh yes, this sounds promising. I didn't actually thought about serving that ourselves but it's definitely can be explored and I would be up for it.