<?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 How to find the name of the feature layer that was returned in a query? in ArcGIS Runtime SDK for Android Questions</title>
    <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/how-to-find-the-name-of-the-feature-layer-that-was/m-p/494740#M3417</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Basically I am modifying the Select features sample to incorporate multiple feature layers. What is the code to get the name of the layer that would be selected during a query?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;For example in the following code &lt;/SPAN&gt;&lt;PRE class="plain" name="code"&gt;if (uid != -1) {
&amp;nbsp;&amp;nbsp;&amp;nbsp; g = gLayer.getGraphic(uid);
&amp;nbsp;&amp;nbsp;&amp;nbsp; if (g!= null &amp;amp;&amp;amp; g.getGeometry() != null) {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fLayer.clearSelection();
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Query q = new Query();
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // optional
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; q.setReturnGeometry(true);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; q.setMaxFeatures(1);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; q.setInSpatialReference(mapView.getSpatialReference());
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; q.setGeometry(g.getGeometry());
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; q.setSpatialRelationship(SpatialRelationship.INTERSECTS);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; 

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fLayer.selectFeatures(q, SELECTION_METHOD.NEW, selectfeatureCallbackListener());&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;instead of stating fLayer.selectFeatures how could I first find the layer that the spatialrelationship intersects and then run the selection method on it?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;so the last line of the code would read &lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;somevariable.selectFeatures(q, SELECTION_METHOD.NEW, selectfeatureCallbackListener());&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 11 Apr 2013 19:12:03 GMT</pubDate>
    <dc:creator>BrianMulcahy</dc:creator>
    <dc:date>2013-04-11T19:12:03Z</dc:date>
    <item>
      <title>How to find the name of the feature layer that was returned in a query?</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/how-to-find-the-name-of-the-feature-layer-that-was/m-p/494740#M3417</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Basically I am modifying the Select features sample to incorporate multiple feature layers. What is the code to get the name of the layer that would be selected during a query?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;For example in the following code &lt;/SPAN&gt;&lt;PRE class="plain" name="code"&gt;if (uid != -1) {
&amp;nbsp;&amp;nbsp;&amp;nbsp; g = gLayer.getGraphic(uid);
&amp;nbsp;&amp;nbsp;&amp;nbsp; if (g!= null &amp;amp;&amp;amp; g.getGeometry() != null) {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fLayer.clearSelection();
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Query q = new Query();
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // optional
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; q.setReturnGeometry(true);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; q.setMaxFeatures(1);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; q.setInSpatialReference(mapView.getSpatialReference());
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; q.setGeometry(g.getGeometry());
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; q.setSpatialRelationship(SpatialRelationship.INTERSECTS);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; 

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fLayer.selectFeatures(q, SELECTION_METHOD.NEW, selectfeatureCallbackListener());&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;instead of stating fLayer.selectFeatures how could I first find the layer that the spatialrelationship intersects and then run the selection method on it?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;so the last line of the code would read &lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;somevariable.selectFeatures(q, SELECTION_METHOD.NEW, selectfeatureCallbackListener());&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Apr 2013 19:12:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/how-to-find-the-name-of-the-feature-layer-that-was/m-p/494740#M3417</guid>
      <dc:creator>BrianMulcahy</dc:creator>
      <dc:date>2013-04-11T19:12:03Z</dc:date>
    </item>
  </channel>
</rss>

