takahiro_kamiyaesrij-esridist

Identify features also support FeatureCollectionLayer

Discussion created by takahiro_kamiyaesrij-esridist Employee on Dec 11, 2017
Latest reply on Dec 13, 2017 by takahiro_kamiyaesrij-esridist

Does IdentifyLayerAsync Method also support FeatureCollectionLayer?

 

https://developers.arcgis.com/net/latest/forms/guide/identify-features.htm

https://developers.arcgis.com/net/latest/ios/api-reference//html/T_Esri_ArcGISRuntime_Mapping_FeatureCollectionLayer.htm

 

The GeoElement list is empty.

 

var layer = MyMapView.Map.OperationalLayers[0];
var pixelTolerance = 20;
var returnPopupsOnly = true;
var maxResults = 1;

var idResults = await MyMapView.IdentifyLayerAsync(layer, e.Position, pixelTolerance, returnPopupsOnly, maxResults);

foreach (GeoElement idElement in idResults.GeoElements)
{
     Feature idFeature = idElement as Feature;
     //idLayer.SelectFeature(idFeature);
}

FeatureCollectionLayer idLayer = idResults.LayerContent as FeatureCollectionLayer;

FeatureCollectionTable tables = (idLayer.FeatureCollection.Tables).FirstOrDefault();

var fields = tables.LayerInfo.Fields;

Outcomes