gee-community / qgis-earthengine-plugin

Integrates Google Earth Engine and QGIS using Python API
http://qgis-ee-plugin.appspot.com
MIT License
454 stars 116 forks source link

Displaying FeatureCollection #41

Closed giswqs closed 4 years ago

giswqs commented 4 years ago

It seems the Map.addLayer() function renders FeatureCollection differently than the GEE Code Editor. By default, the FeatureCollection is display as all black, which makes it difficult to distinguish individual features within a FeatureCollection. See below.

import ee
from ee_plugin import Map

fc = ee.FeatureCollection('TIGER/2018/States')

image = ee.Image().paint(fc, 0, 2)
Map.setCenter(-99.844, 37.649, 5)
Map.addLayer(image, {'palette': 'FF0000'}, 'TIGER/2018/States')
Map.addLayer(fc, {}, 'US States')  # This layer is all black

GEE script

gena commented 4 years ago

Thanks for reporting, this will be fixed in the next release.

image

giswqs commented 4 years ago

@gena Awesome! Thanks for the quick fix.