-
Notifications
You must be signed in to change notification settings - Fork 363
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
jupyterlab fails in rendering ImageOverlay from file #120
Comments
Seems to be the same issue like in #347. |
@SylvainCorlay from jupyter-widgets/ipywidgets#1993 (comment) seems there is a way to have this working. I tried with a recent version of pip-installed |
I have the same issue, I can load files in the notebooks so it is not the same as #347. ipydatawidgets==4.0.1
|
This is documented in the
We should maybe add it to the ImageOverlay and VideoOverlay documentation. PR welcome! |
Thanks a lot for your quick reply. so if I have an image in the folder "/home/username/tests/image.png" how do I set it with LocalTileLayer? Also how do I set the bounds? do I have to set it in the path (/{z}/{x}/{y}) but how do I set the image extent then? Thanks again! |
@konanast I believe only relative path is supported. See the documentation.
|
Here is a function from the geemap package that supports absolute path.
|
Thanks a lot for the replay! For Jupyter Lab: 'files/working_folder/image.png' Example code:
The notebook (.ipynb) is in the same folder (test_project) with the image (cat.png) A simple way to get the working folder is:
The way it is described in the documentation is a bit confusing, please let me know how can I help to improve the documentation. |
We should definitely update the documentation (so that it's simpler to add a cat on a map 😄) |
Yes:) I proposed to add this in the documentation of ImageOverlay:
So it will be easier for someone to understand how to make it work in Jupyter Lab. |
Would you like to open a PR so you get credits for it? |
Hello, I have tried the method above for Jupyterlab with 'files/working_folder/image.png' and it didn't work. |
Trying to load a
jpg
image inipyleaflet
usingImageOverlay
I got different behaviour between the standard notebook interface and jupyterlab.The following code work in a standard notebook but fail to render the image (404 error) in jupyterlab.
This notebook may help to reproduce the issue.
If using a an url pointing to a fileonline, in jupyterlab, the image is rendered correctly.
The text was updated successfully, but these errors were encountered: