Comments (10)
@12rambau You can update ipyleaflet to the latest version and geemap should work just fine. The reason I put ipyleaflet v0.13.3 is because ipyleaflet>0.13.3 pip installation does not work properly on Windows jupyter-widgets/ipyleaflet#769. For conda installation, geemap should automatically install the latest ipyleaflet. https://github.com/conda-forge/geemap-feedstock/blob/master/recipe/meta.yaml
from xarray_leaflet.
ok so I welcome myself in the compatibility nightmare
I think I find a solution.
- first the jupyterlab url is weirdly handle (and I wrote this part of the code so I'm the only one to blame)
- I effectively needed to updated my version of
ipyleaflet
andtraitlet
to the latest available on 3.6.9 (i.e. -> 4.3.3) - As explained in this issue (sepal #64) We are experiencing a real problem with the GDAL and rasterIocompatibility in our platform. Here I also neede to discard the
PROJ_LIB
env variable to ue your lib
Good thing though is that now that I really dig in your code @davidbrochart, I better understand what you've done and better understand the power of async function. Thanks and congrats !
I will close this issue once everything is set on the prod
env of the SEPAL website
from xarray_leaflet.
By default tiles are saved in tempfile.TemporaryDirectory(prefix='xarray_leaflet_')
. On Linux this will translate to a path starting with /tmp/xarray_leaflet_
. So you can e.g. ls -lrt /tmp
and see if something has been written there.
In the browser you could look at the network analyzer and see the status of the requests corresponding to the tiles.
from xarray_leaflet.
Well, I gave all I had but it's clearly beyond my skills ;-)
new intel
The tmp/xarray_leaflet_turlutut/
folder is never filled or created so I don't have any tiles to load. but the tmp
can be written so normally no problem there.
I don't see any requests in the network analyser, I have the feeling that this step is never reached.
I want to mention that our env is in Python 3.6.9 and that my ipyleaflet
version is limited to 0.13.3 by geemap
. but I don't see any problem according to your setup.py.
I tried to display a lot of intermediate output to see where it was blocked but I can't get the output_debug
to work properly. It writes the first print
statement but as soon as we go to async def
or functions called by the observe
on "bounds"
I see nothing.
Question:
url
The shape of the url to fetch the tiles (base_url
) must look like the following right:
https://sepal.io/api/sandbox/jupyter
Basically everything up to the first "jupyter"
That makes a final url of the form :
https://sepal.io/api/sandbox/jupyter/xarray_leaflet/tmp/xarray_leaflet_turlututu/{z}/{x}/{y}.png
If this is the case, I have to modify the base_url
construction, I made a mistake for lab in my last PR.
fit_bounds functions
Then if I set fit_bounds
to False
, async_wait_for_bounds
doesn't launch if I don't zoom right ?
from xarray_leaflet.
@giswqs is it still working on your side in geemap ?
from xarray_leaflet.
I just tested the notebook example on my Linux machine with Python 3.8 and ipyleaflet 0.13.6. It works fine.
https://geemap.org/notebooks/25_load_rasters
from xarray_leaflet.
It should work but instead the spinning wheel turns forever and nothing appears on the map.
Hi, I'm experiencing this issue as well on both Linux and Mac.
-
Linux:
I'm trying to use xarray_leaflet in a notebook running in a Ubuntu-based Docker container on a JupyterHub. I initially encountered this issue while working on my own notebook, but I am able to replicate it with the introduction.ipynb notebook. I see a/tmp/xarray_leaflet_*
directory, but it is empty. The "loading" wheel spins endlessly -
Mac:
Again, I've tried both my own notebook and the introduction.ipynb demo notebook from this repo. The/var/folders/**/**/**/xarray_leaflet_*
directory exists and the tiles appear to be written. The map remains blank aside from the basemap, however.
I do not encounter this issue in the Binder for this repo.
from xarray_leaflet.
Maybe you could have a look at the debug_output
in the dynamic.ipynb
notebook?
from xarray_leaflet.
#42 helped solve this issue. I modified the code block
if self.url.endswith('/lab'):
# we are in JupyterLab
self.base_url = self.url[:-4]
to
if self.url.find('/lab/') != -1:
# we are in JupyterLab
i_lab=self.url.find('/lab/')
self.base_url = self.url[:i_lab]
from xarray_leaflet.
See #45
from xarray_leaflet.
Related Issues (20)
- Change tile server
- can't see data on map HOT 3
- Default CRS and nodata
- Interact with extra dimensions
- How to render xarray_leaflet with voila? E.g. $ voila xarray_interact.ipynb HOT 4
- Attribute error on open_rasterio function
- No data display HOT 5
- 'LeafletMap' object has no attribute 'base_url' in JupyterLab HOT 6
- are you considering releasing the colormap ? HOT 2
- Tile URL management HOT 5
- Zarr support HOT 20
- Colorbar does not show if dynamic=False
- Renamed default branch to main
- DataArrays that aren't in lat-lon co-ordinates: are they supported? HOT 3
- is it possible to filter out some values when using the plot function ?
- Extra install for vector support
- Hierarchical arrays
- module 'xarray.core' has no attribute 'rolling' HOT 1
- Installing xarray-leaflet causes jupyter server to be really slow to start HOT 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from xarray_leaflet.