NOTE I am asking about FeatureViews/FeatureViewLayers NOT FeatureCollections.
In the Earth Engine Code Editor, you can use the Inspector and click on a point on a FeatureView and see its properties.
But I cannot get that to work via code, such as the following:
// Define the FeatureView asset ID.
var assetId = 'WCMC/WDPA/current/polygons_FeatureView';
// Import the FeatureView asset as a FeatureViewLayer.
var layer = ui.Map.FeatureViewLayer(assetId);
// Add the FeatureViewLayer to the map.
Map.add(layer);
//Create a point to query
var point = ee.Geometry.Point([-105.67, 40.01]);
//show properties of the FeatureView/FeatureViewLayer at that location
layer.filterBounds(point).first().evaluate(function(result) {
print(result.properties);
});
In the code editor Inspector, if I click that point I get the following properties pasted below, so that would seem to suggest they are somehow queryable. Any idea how to do this?
The reason I ask is that since FeatureViewLayers are so much more performant than FeatureCollections, I was thinking they may be faster for querying properties as well.
Not Applicable DESIG: Wilderness Area DESIG_ENG: Wilderness Area DESIG_TYPE: National GIS_AREA: 316.40157646838 GIS_M_AREA: 0 GOV_TYPE: Federal or national ministry or agency INT_CRIT: Not Applicable ISO3: USA IUCN_CAT: Ib MANG_AUTH: County Land ; Forest Service ; National Park Service MANG_PLAN: Not Reported MARINE: 0 METADATAID: 1848 NAME: Indian Peaks NO_TAKE: Not Applicable NO_TK_AREA: 0 ORIG_NAME: Indian Peaks OWN_TYPE: State PARENT_ISO: USA PA_DEF: 1 REP_AREA: 316.035332426744 REP_M_AREA: 0 STATUS: Designated STATUS_YR: 1978 SUB_LOC: US-CO SUPP_INFO: Not Applicable VERIF: State Verified WDPAID: 370053 WDPA_PID: 370053 system:index: 002900000000000005fa