gee-community/geemap

Drawing tools missing in Vertex AI user-managed JupyterLab notebook

Closed this issue · 3 comments

yvnf commented

I'm trying to use geemap in a user-managed JupyterLab notebook within Google Cloud Vertex AI workbench, the map renders successfully but is missing the drawing tools.

I've been testing with just a basic map using the following:

import ee
import geemap

Map = geemap.Map()
Map

I've also tried to use ipyleaflet.Map() instead of geemap but the drawing tools are still missing.

image

print(geemap.__version__) confirms that it is v0.17.1, jupyter labextension list shows that jupyter-leaflet is also v0.17.1:

JupyterLab v3.2.9
/opt/conda/share/jupyter/labextensions
        jupyterlab-jupytext v1.3.8+dev enabled OK (python, jupytext)
        ipytree v0.2.2 enabled OK
        nbdime-jupyterlab v2.1.1 enabled OK
        jupyterlab-plotly v5.10.0 enabled OK
        jupyter-leaflet v0.17.1 enabled OK
        jupyterlab_pygments v0.2.2 enabled OK (python, jupyterlab_pygments)
        ipyevents v2.0.1 enabled OK
        bqplot v0.5.37 enabled OK (python, bqplot)
        @jupyter-widgets/jupyterlab-manager v5.0.3 enabled OK (python, jupyterlab_widgets)
        @jupyterlab/server-proxy v3.2.1 enabled OK
        @jupyterlab/git v0.37.1 enabled OK (python, jupyterlab-git)

Other labextensions (built into JupyterLab)
   app dir: /opt/conda/share/jupyter/lab
        beatrix_jupyterlab v3.1.7 disabled OK
        plotlywidget v4.14.3 enabled OK
        wit-widget v1.8.1 enabled OK


Disabled extensions:
    beatrix_jupyterlab (all plugins)

Doing the same in Colab brings up the drawing tools, which I would like to replicate in Vertex AI.

image

Thank you!

I have not used Google Cloud Vertex AI workbench before, and I don't how it works. Does it support ipywidgets? Try the ipyleaflet DrawControl example. If it does not work, then geemap won't work either.

https://ipyleaflet.readthedocs.io/en/latest/controls/draw_control.html

yvnf commented

ipywidgets is supported, I am using some widgets in other parts of the script. I tried the DrawControl example you linked with no success unfortunately.

image

Can this be explored further please? We're trying to move towards having all our workflows within the Google Cloud Platform infrastructure and away from Colab.

Since the ipyleaflet DrawControl example does not work, it is probably an issue related to ipyleaflet. I would encourage you to open an issue on the ipyleaflet repo https://github.com/jupyter-widgets/ipyleaflet/issues. I don't think this issue can be resolved by geemap.