gee-community/geemap

add_colorbar() no longer works?

FeiYao-Edinburgh opened this issue · 1 comments

Environment Information

Please run the following code on your computer and share the output with us so that we can better debug your issue:

import geemap
geemap.Report()

image

Description

I simply copy codes from here but found no colorbar added.

What I Did

Map = geemap.Map()

dem = ee.Image('USGS/SRTMGL1_003')
vis_params = {
    'min': 0,
    'max': 4000,
    'palette': ['006633', 'E5FFCC', '662A00', 'D8D8D8', 'F5F5F5'],
}

Map.addLayer(dem, vis_params, 'SRTM DEM')

Map.add_colorbar(
    vis_params, label="Elevation (m)", layer_name="SRTM DEM", orientation="vertical"
)
Map

It looks like an incomplete colorbar has been added at the bottomright location, highlighted with red ractange below:

image

It works fine on my local Jupyter and Colab. I suggest you create a new conda env to install geemap. Likely an ipywidgets issue in your env.

image