Giter VIP home page Giter VIP logo

Comments (10)

giswqs avatar giswqs commented on August 20, 2024 1

@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.

12rambau avatar 12rambau commented on August 20, 2024 1

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 and traitlet 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.

davidbrochart avatar davidbrochart commented on August 20, 2024

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.

12rambau avatar 12rambau commented on August 20, 2024

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.

12rambau avatar 12rambau commented on August 20, 2024

@giswqs is it still working on your side in geemap ?

from xarray_leaflet.

giswqs avatar giswqs commented on August 20, 2024

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.

bmcandr avatar bmcandr commented on August 20, 2024

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.

davidbrochart avatar davidbrochart commented on August 20, 2024

Maybe you could have a look at the debug_output in the dynamic.ipynb notebook?

from xarray_leaflet.

peterhob avatar peterhob commented on August 20, 2024

#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.

davidbrochart avatar davidbrochart commented on August 20, 2024

See #45

from xarray_leaflet.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.