He tenido éxito convirtiendo mi featureCollection a raster y luego trazando el featureCollection (con transparencia) encima del raster.
// bottom-left, top-right
var aoi = ee.Geometry.Rectangle(43.1, 13, 47, 30);
var ecoregions = ee.FeatureCollection('RESOLVE/ECOREGIONS/2017')
.filterBounds(aoi);
var ecoregions_img = ecoregions
.filter(ee.Filter.notNull(['SHAPE_AREA']))
.reduceToImage({
properties: ['SHAPE_AREA'],
reducer: ee.Reducer.first()
});
var area_values = ecoregions
.filter(ee.Filter.greaterThan("SHAPE_AREA", 0))
.aggregate_array("SHAPE_AREA");
print(area_values) // 0 - 72
Map.centerObject(ecoregions, 4)
Map.addLayer(ecoregions_img, {
min: 0,
max: 73,
palette: ['FCFDBF', 'FDAE78', 'EE605E', 'B63679', '711F81', '2C105C']
});
Map.addLayer({eeObject: ecoregions.draw({color: 'black', strokeWidth: 1}), visParams: {}, opacity: 0.3});
Véase https://developers.google.com/earth-engine/guides/reducers_reduce_to_image