-
Notifications
You must be signed in to change notification settings - Fork 29
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
Accessing localtileserver from remote Jupyter environment #29
Comments
I'm not sure if this is something that can be addressed by In brief, The This would get very complicated really quickly... I'm going to ping @martinRenou here to see if:
|
Otherwise, what you can do is have your tile server running on another remote server with a publically visible URL. This is exactly what my team and I have built in ResonantGeoData and is demonstrated in this PR: ResonantGeoData/ResonantGeoData#603 |
Thanks for the insight. It makes a lot of sense. This feature is just my wish-list. No worries if it can't be implmented. Just curious, what kind of memory object could potentially make this work? Would the ipyleaflet LocalTileLayer be useful in this case? I would be happy to look into it if there is a path forward. |
Ahhh, |
I don't think The client web browser would not be able to access that. |
We would have to make an ipywidget/comm that could pass the bytes of a PNG image. Then I'd have to refactor |
Would the following code be relevant? https://github.com/giswqs/leafmap/blob/master/leafmap/leafmap.py#L1400 image = Image.open(url)
f = BytesIO()
image.save(f, ext)
data = data.decode("ascii")
url = "data:image/{};base64,".format(ext) + data |
Yep, that's what we'd do, but we'd need ipyleaflet to be able to take each one of those as tiles in the TileLayer |
This looks promising as a way to proxy the local web server over to Jupyter on MyBinder: https://jupyter-server-proxy.readthedocs.io/en/latest/arbitrary-ports-hosts.html |
|
FYI, #32 does provide a work around by using a remotely hosted instance |
Thank you very much for implementing this. |
The localtileserver works nicely locally. However, I have not been able to make it work in a cloud environment. I have tested it multiple cloud env without success, such as https://binder.pangeo.io, https://mybinder.org, https://streamlit.io/cloud and Google Colab. Below is the
environment.yml
I used to create the env. It would be nice to have a working env that users can launch a notebook to test localtileserver with a simple click.The text was updated successfully, but these errors were encountered: