I am trying to write a function that when a region is clicked on the map, a dot will show and will highlight the region, and show a property in its FeatureCollection (UHIAdded)
. Here is my code:
lat.setValue('Lat: ' + coords.lat.toFixed(2));
lon.setValue('Lon: ' + coords.lon.toFixed(2));
Dayall.setValue('Annual daytime UHI: ' + ee.Number(UHIAdded.filterBounds(ee.Geometry.Point(coords.lon, coords.lat)).get('UHIday')));
print(UHIAdded.filterBounds(ee.Geometry.Point(coords.lon, coords.lat)).getArray('Area'));
The result showed up as this:
Lat: 37.84
Lon: -120.81
Annual daytime UHI: ee.Number({ "type": "Invocation", "arguments": { "object": { "type": "Invocation", "arguments": { "collection": { "type": "Invocation", "arguments": { "collection": { "type": "Invocation", "arguments": { "collection": { "type": "Invocation", "arguments": { "tableId":......)
and the printed value is
Null
Why won't FeatureCollection.get
work and how do I access the specific property/column