<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Query all ENC features on a single click in .NET Maps SDK Questions</title>
    <link>https://community.esri.com/t5/net-maps-sdk-questions/query-all-enc-features-on-a-single-click/m-p/1674644#M13822</link>
    <description>&lt;P&gt;Thank you for the reply - I have implemented your suggestion with the overload and it works as expected. Cheers!&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 23 Dec 2025 10:31:37 GMT</pubDate>
    <dc:creator>MattAshman96</dc:creator>
    <dc:date>2025-12-23T10:31:37Z</dc:date>
    <item>
      <title>Query all ENC features on a single click</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/query-all-enc-features-on-a-single-click/m-p/1673560#M13808</link>
      <description>&lt;P&gt;I have this code that works well for querying the ENC feature that is clicked on.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;P&gt;What I want to do, is be able to display information on every feature that is located at the clicked-on point (common case is you have a buoy with a light, so I want to be able to display the information about the light and the buoy). I would create a custom popup window for this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would have thought I'd achieve this by iterating through the firstResult.GeoElements list - but that only contains the feature at the top level and not all the features underneath as well.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there any way to achieve what I am after?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/DIV&gt;&lt;LI-CODE lang="csharp"&gt;IReadOnlyList&amp;lt;IdentifyLayerResult&amp;gt; results = await _mapView.IdentifyLayersAsync(e.Position, tolerance, false);
IEnumerable&amp;lt;IdentifyLayerResult&amp;gt; encResults = results.Where(result =&amp;gt; result.LayerContent is EncLayer);
IdentifyLayerResult firstResult = encResults.First();
EncLayer containingLayer = (EncLayer)firstResult.LayerContent;
EncFeature encFeature = (EncFeature)firstResult.GeoElements.First();
containingLayer.SelectFeature(encFeature);
StringBuilder sbAttr = new StringBuilder();
foreach (var item in encFeature.Attributes)
{
				sbAttr.AppendLine(item.Key + ":  " + item.Value);
}
CalloutDefinition definition = new CalloutDefinition(encFeature.Description, sbAttr.ToString());
_mapView.ShowCalloutAt(e.Location, definition);&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 17 Dec 2025 11:14:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/query-all-enc-features-on-a-single-click/m-p/1673560#M13808</guid>
      <dc:creator>MattAshman96</dc:creator>
      <dc:date>2025-12-17T11:14:40Z</dc:date>
    </item>
    <item>
      <title>Re: Query all ENC features on a single click</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/query-all-enc-features-on-a-single-click/m-p/1673643#M13810</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;As specified in the &lt;A href="https://developers.arcgis.com/net/api-reference/api/net/Maui/Esri.ArcGISRuntime.Maui.GeoView.IdentifyLayersAsync.html#Esri_ArcGISRuntime_Maui_GeoView_IdentifyLayersAsync_Point_System_Double_System_Boolean_System_Threading_CancellationToken_:~:text=IdentifyLayersAsync,-(Point%2C%20Double%2C%20Boolean%2C%20CancellationToken" target="_self"&gt;documentation&lt;/A&gt;, your IdentifyLayersAsync method i&lt;SPAN&gt;nitiates an identify operation on all layers in the view which will return the single visible &lt;STRONG&gt;topmost geoelement per layer only.&lt;/STRONG&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;There is &lt;A href="https://developers.arcgis.com/net/api-reference/api/net/Maui/Esri.ArcGISRuntime.Maui.GeoView.IdentifyLayersAsync.html#Esri_ArcGISRuntime_Maui_GeoView_IdentifyLayersAsync_Point_System_Double_System_Boolean_System_Threading_CancellationToken_:~:text=IdentifyLayersAsync(Point%2C%20Double%2C%20Boolean%2C%20Int64%2C%20CancellationToken)" target="_self"&gt;overload&lt;/A&gt; of&amp;nbsp;IdentifyLayersAsync method which allows you to specify the maximum number of geoelements to return per layer:&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;public Task&amp;lt;IReadOnlyList&amp;lt;IdentifyLayerResult&amp;gt;&amp;gt; IdentifyLayersAsync(Point screenPoint, double tolerance, bool returnPopupsOnly, long maximumResultsPerLayer, CancellationToken cancellationToken)&lt;/LI-CODE&gt;&lt;P&gt;&lt;SPAN&gt;Or you could try to use spatial &lt;A href="https://developers.arcgis.com/net/query/" target="_self"&gt;query&lt;/A&gt;&amp;nbsp;to get all features at the clicked point.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 17 Dec 2025 16:31:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/query-all-enc-features-on-a-single-click/m-p/1673643#M13810</guid>
      <dc:creator>GKmieliauskas</dc:creator>
      <dc:date>2025-12-17T16:31:51Z</dc:date>
    </item>
    <item>
      <title>Re: Query all ENC features on a single click</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/query-all-enc-features-on-a-single-click/m-p/1674644#M13822</link>
      <description>&lt;P&gt;Thank you for the reply - I have implemented your suggestion with the overload and it works as expected. Cheers!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 23 Dec 2025 10:31:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/query-all-enc-features-on-a-single-click/m-p/1674644#M13822</guid>
      <dc:creator>MattAshman96</dc:creator>
      <dc:date>2025-12-23T10:31:37Z</dc:date>
    </item>
  </channel>
</rss>

