I am adding features to my map by manually creating a FeatureCollectionLayer from a JSON webservice. Now I am not able to identify features on my map once they are tapped. The IdentifyLayerAsync method seems will not return any GeoElements.
I am using the exact same code on a FeatureLayer and it works perfectly.
Does the process change for a FeatureCollectionLayer?
After further research, it appears that identify is only available on Feature Layers and Graphic Layers. Features in a FeatureCollectionLayer are not capable of having GeoElements identified.
For identifying on FeatureCollections, try checking the SublayerResults...
something like this:
if (identifyLayerResult.SublayerResults?.Count > 0)
foreach (var sr in identifyLayerResult.SublayerResults)
if (sr.Popups?.Count > 0)
identifyInfoString += sr.LayerContent.Name + ": --> " + sr.Popups.Count + " features identified." + Environment.NewLine;
identifyInfoString += sr.LayerContent.Name + ": --> " + sr.GeoElements.Count + " features identified." + Environment.NewLine;