<?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: Android: Attempting to extract the layer or graphic details from the selected rectangle in ArcGIS Runtime SDK for Android Questions</title>
    <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/android-attempting-to-extract-the-layer-or-graphic/m-p/1187952#M5793</link>
    <description>&lt;P&gt;Hi Rama,&lt;/P&gt;&lt;P&gt;Thanks for quick response. I'm able to get the SeviceFeature table. Now im facing "java.util.concurrent.ExecutionException: com.esri.arcgisruntime.ArcGISRuntimeException: Invalid call.: Object failed to load, unable to execute task." for below mentioned code.&amp;nbsp;&lt;/P&gt;&lt;P&gt;This error is occuring when we are trying to get the result from feature table "queryResult.get()" @ line number 10.&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="kotlin"&gt;fun getFeatures(featureTables: List&amp;lt;ServiceFeatureTable&amp;gt;){

    val queryParameters = QueryParameters()
    queryParameters.geometry = graphic.geometry
    queryParameters.spatialRelationship = QueryParameters.SpatialRelationship.CONTAINS

    val queryResult = featureTables[0].queryFeaturesAsync(queryParameters)
    queryResult.addDoneListener {
      try {
        val result = queryResult.get()
      } catch (e: Exception) {
        e.printStackTrace()
      }
    }
  }&lt;/LI-CODE&gt;</description>
    <pubDate>Wed, 29 Jun 2022 18:17:40 GMT</pubDate>
    <dc:creator>Dee4</dc:creator>
    <dc:date>2022-06-29T18:17:40Z</dc:date>
    <item>
      <title>Android: Attempting to extract the layer or graphic details from the selected rectangle</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/android-attempting-to-extract-the-layer-or-graphic/m-p/1187366#M5789</link>
      <description>&lt;P&gt;&lt;SPAN&gt;There is a feature on the map that allows you to select a certain area in the existing map using a 'RECTANGLE' or any using other options.&amp;nbsp;We need to show the layer details within the selected area, . I've attached a screenshot in which I've used sketchEditor to mark the area, and now I need to show the available layer data within that area. I'm not sure how to proceed because we need to pass some parameters, such as the screen point, in order to get the layer data. I can get the geometry value from the sketchEditor, but I'm not sure if I can access the layer data from passing that.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Could anyone mention how to get the graphic details from the selected area?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Dee4_0-1656430349977.jpeg" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/44659i246F2A6ADB91607D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Dee4_0-1656430349977.jpeg" alt="Dee4_0-1656430349977.jpeg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Jun 2022 15:36:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/android-attempting-to-extract-the-layer-or-graphic/m-p/1187366#M5789</guid>
      <dc:creator>Dee4</dc:creator>
      <dc:date>2022-06-28T15:36:58Z</dc:date>
    </item>
    <item>
      <title>Re: Android: Attempting to extract the layer or graphic details from the selected rectangle</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/android-attempting-to-extract-the-layer-or-graphic/m-p/1187575#M5790</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;If the operational layers from which you are trying get data are FeatureLayers, then you can perform a spatial query on its feature table.&lt;/P&gt;&lt;P&gt;You can use this &lt;A href="https://github.com/Esri/arcgis-runtime-samples-android/blob/bd6ff32059f3956bed90c18b559c841b0cb683f1/java/feature-layer-query/src/main/java/com/esri/arcgisruntime/sample/featurelayerquery/MainActivity.java#L108" target="_self"&gt;sample&lt;/A&gt; as a reference to perform a query on FeatureLayer. The sample is performing a query based on where condition, but you can update the sample to set your rectangle's geometry as query parameter's geometry and then also define a &lt;A href="https://developers.arcgis.com/android/api-reference/reference/com/esri/arcgisruntime/data/QueryParameters.SpatialRelationship.html" target="_self"&gt;spatial relationship&lt;/A&gt;.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="java"&gt;QueryParameters queryParameters = new QueryParameters();
queryParameters.setGeometry = &amp;lt;YOUR INPUT RECTANGLE GEOMETRY&amp;gt;;
queryParameters.setSpatialRelationship(QueryParameters.SpatialRelationship.INTERSECTS);&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;Rama&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Jun 2022 22:33:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/android-attempting-to-extract-the-layer-or-graphic/m-p/1187575#M5790</guid>
      <dc:creator>RamaChintapalli</dc:creator>
      <dc:date>2022-06-28T22:33:59Z</dc:date>
    </item>
    <item>
      <title>Re: Android: Attempting to extract the layer or graphic details from the selected rectangle</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/android-attempting-to-extract-the-layer-or-graphic/m-p/1187952#M5793</link>
      <description>&lt;P&gt;Hi Rama,&lt;/P&gt;&lt;P&gt;Thanks for quick response. I'm able to get the SeviceFeature table. Now im facing "java.util.concurrent.ExecutionException: com.esri.arcgisruntime.ArcGISRuntimeException: Invalid call.: Object failed to load, unable to execute task." for below mentioned code.&amp;nbsp;&lt;/P&gt;&lt;P&gt;This error is occuring when we are trying to get the result from feature table "queryResult.get()" @ line number 10.&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="kotlin"&gt;fun getFeatures(featureTables: List&amp;lt;ServiceFeatureTable&amp;gt;){

    val queryParameters = QueryParameters()
    queryParameters.geometry = graphic.geometry
    queryParameters.spatialRelationship = QueryParameters.SpatialRelationship.CONTAINS

    val queryResult = featureTables[0].queryFeaturesAsync(queryParameters)
    queryResult.addDoneListener {
      try {
        val result = queryResult.get()
      } catch (e: Exception) {
        e.printStackTrace()
      }
    }
  }&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 29 Jun 2022 18:17:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/android-attempting-to-extract-the-layer-or-graphic/m-p/1187952#M5793</guid>
      <dc:creator>Dee4</dc:creator>
      <dc:date>2022-06-29T18:17:40Z</dc:date>
    </item>
    <item>
      <title>Re: Android: Attempting to extract the layer or graphic details from the selected rectangle</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/android-attempting-to-extract-the-layer-or-graphic/m-p/1187974#M5794</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Whats the geometry being passed here. Is it an envelope or polygon, does it have a spatial reference defined? Also which feature service being used - is it an enterprise feature service or ArcGIS Online hosted feature service?&lt;BR /&gt;&lt;BR /&gt;I was able to get the spatial query work with below sample service, only difference is the input geometry and service.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="java"&gt; 
ServiceFeatureTable serviceFeatureTable = new ServiceFeatureTable("https://sampleserver6.arcgisonline.com/arcgis/rest/services/Sync/WildfireSync/FeatureServer/0");


QueryParameters queryParameters = new QueryParameters();
 queryParameters.setGeometry(mapView.getVisibleArea().getExtent());    
queryParameters.setSpatialRelationship(QueryParameters.SpatialRelationship.CONTAINS);

serviceFeatureTable.queryFeaturesAsync(queryParameters);&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 29 Jun 2022 21:46:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/android-attempting-to-extract-the-layer-or-graphic/m-p/1187974#M5794</guid>
      <dc:creator>RamaChintapalli</dc:creator>
      <dc:date>2022-06-29T21:46:26Z</dc:date>
    </item>
    <item>
      <title>Re: Android: Attempting to extract the layer or graphic details from the selected rectangle</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/android-attempting-to-extract-the-layer-or-graphic/m-p/1191563#M5808</link>
      <description>&lt;P&gt;Thank You&amp;nbsp;RamaChintapalli.&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jul 2022 14:50:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/android-attempting-to-extract-the-layer-or-graphic/m-p/1191563#M5808</guid>
      <dc:creator>Dee4</dc:creator>
      <dc:date>2022-07-12T14:50:53Z</dc:date>
    </item>
  </channel>
</rss>

