Giancarlo
Giancarlo

Reputation: 11

Can not visualize maps in Geemap - Google Colab

Today 07/07/2022, I am working in Geemap trough Google Colab. I have been working with some codes that have been performed OK, however, today the interactive map is not displayed. Also I have tried with other public codes, and the issue remains. Has someone experienced this kind of problem? Thanks for help.

A sample of code is given:

rgb2 = ['B8_median','B11_median','B4_median']
# set some thresholds
rgbViz2 = {"min":0.0, "max":3000,"bands":rgb2}

collectionx = ee.ImageCollection('COPERNICUS/S2_SR').filterDate("2020-06-25","2020-09-11").filterBounds(aoi2).filter(ee.Filter.lt("CLOUDY_PIXEL_PERCENTAGE",6))
collectionrgb = collectionx.select('B8','B11','B4', 'B3','B2')
medianx = collectionrgb.reduce(ee.Reducer.median());

#Get information about the bands as a list.
bandNames = medianx.bandNames()
print('Band names: ', bandNames.getInfo())

# initialize our map
map6 = geemap.Map()
map6.centerObject(aoi2, 8)
map6.addLayer(medianx.clip(aoi2), rgbViz2, "S2")
map6.addLayerControl()
map6

Upvotes: 1

Views: 224

Answers (0)

Related Questions