<?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: Spatial query of multiple services in ArcGIS API for Flex Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/spatial-query-of-multiple-services/m-p/265495#M6234</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;A different approach, but if you can, create a sql view that represents those layers based on an unique id and query that.&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here's a example of a view.&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;A href="http://gis.glo.state.tx.us/test/services/bw/Stations/MapServer/0"&gt;http://gis.glo.state.tx.us/test/services/bw/Stations/MapServer/0&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp; .&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This is in sql 2003.&amp;nbsp; I have a live sql table and point feature class.&amp;nbsp; The view is created from the two.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This is how I've been dealing with this issue since the ArcIMS days.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; Good luck..&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 03 Dec 2010 14:19:34 GMT</pubDate>
    <dc:creator>JeffPerkins</dc:creator>
    <dc:date>2010-12-03T14:19:34Z</dc:date>
    <item>
      <title>Spatial query of multiple services</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/spatial-query-of-multiple-services/m-p/265492#M6231</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am trying to create to tool where you can use find to locate a parcel, then use a spatial query to find data in other services (like zoning, floodplain, school district).&amp;nbsp; I can get it to work finding the parcel and spatial query of one service with a query and querytask.&amp;nbsp; I can't figure out how to do more.&amp;nbsp; I can post my code if that would help.&amp;nbsp; I started with the code posted by Robert Scheitlin at the link below.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://forums.arcgis.com/threads/6812-I-need-an-example-of-how-to-use-a-spatial-relationship-in-a-query.?highlight=spatial+query"&gt;http://forums.arcgis.com/threads/6812-I-need-an-example-of-how-to-use-a-spatial-relationship-in-a-query.?highlight=spatial+query&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Dec 2010 14:59:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/spatial-query-of-multiple-services/m-p/265492#M6231</guid>
      <dc:creator>ShannonMartel</dc:creator>
      <dc:date>2010-12-01T14:59:50Z</dc:date>
    </item>
    <item>
      <title>Re: Spatial query of multiple services</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/spatial-query-of-multiple-services/m-p/265493#M6232</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Does anyone have any ideas?&amp;nbsp; I am still stuck!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you in advance for any help!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Dec 2010 12:38:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/spatial-query-of-multiple-services/m-p/265493#M6232</guid>
      <dc:creator>ShannonMartel</dc:creator>
      <dc:date>2010-12-03T12:38:55Z</dc:date>
    </item>
    <item>
      <title>Re: Spatial query of multiple services</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/spatial-query-of-multiple-services/m-p/265494#M6233</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Shannon,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; I don't know of any other way to do this than to do the spatial query on each layer that you want to search for one at a time. The FindTask that can search multiple layers at once only accepts a sting and not a spatial component.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Dec 2010 13:21:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/spatial-query-of-multiple-services/m-p/265494#M6233</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2010-12-03T13:21:56Z</dc:date>
    </item>
    <item>
      <title>Re: Spatial query of multiple services</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/spatial-query-of-multiple-services/m-p/265495#M6234</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;A different approach, but if you can, create a sql view that represents those layers based on an unique id and query that.&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here's a example of a view.&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;A href="http://gis.glo.state.tx.us/test/services/bw/Stations/MapServer/0"&gt;http://gis.glo.state.tx.us/test/services/bw/Stations/MapServer/0&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp; .&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This is in sql 2003.&amp;nbsp; I have a live sql table and point feature class.&amp;nbsp; The view is created from the two.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This is how I've been dealing with this issue since the ArcIMS days.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; Good luck..&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Dec 2010 14:19:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/spatial-query-of-multiple-services/m-p/265495#M6234</guid>
      <dc:creator>JeffPerkins</dc:creator>
      <dc:date>2010-12-03T14:19:34Z</dc:date>
    </item>
    <item>
      <title>Re: Spatial query of multiple services</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/spatial-query-of-multiple-services/m-p/265496#M6235</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Could I run multiple queryTasks in the FindEvent?&amp;nbsp; I have in the findCompleteHandler(event.FindEvent) there is on "queryTask.execute(query)"&amp;nbsp; Could I do at queryTask2.execute(query) queryTask3.execute(query) and then put all the results in a datagrid?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Dec 2010 14:22:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/spatial-query-of-multiple-services/m-p/265496#M6235</guid>
      <dc:creator>ShannonMartel</dc:creator>
      <dc:date>2010-12-03T14:22:20Z</dc:date>
    </item>
    <item>
      <title>Re: Spatial query of multiple services</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/spatial-query-of-multiple-services/m-p/265497#M6236</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Shannon,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; It sounds like you don't need the find task at all.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The sequence would be:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;1. use QueryTask to search for particular parcel.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2. use results (parcel Polygon) as geometry for input of next query using same querytask just different url and outfields&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;3. When query 2 returns use same queryTask again (with new url to School Districts) and same geometry from query 2.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;4. Repeat the same for all additional layers that need to be queried.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Dec 2010 14:37:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/spatial-query-of-multiple-services/m-p/265497#M6236</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2010-12-03T14:37:48Z</dc:date>
    </item>
    <item>
      <title>Re: Spatial query of multiple services</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/spatial-query-of-multiple-services/m-p/265498#M6237</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Robert,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am a little confused how to how to use the same querytask.&amp;nbsp; Where do you set the different url for the querytask?&amp;nbsp; Do you by chance have a simple example or know where I could find one.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you again for all your help. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here is my code:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;private function doQuery():void
&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp; // clear the graphics layer
&amp;nbsp;&amp;nbsp;&amp;nbsp; myGraphicsLayer.clear();
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; queryTask.execute(query, new AsyncResponder(onResult, onFault));
&amp;nbsp;&amp;nbsp;&amp;nbsp; function onResult(featureSet:FeatureSet, token:Object = null):void
&amp;nbsp;&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (featureSet.features.length == 0)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Alert.show("No Parcel Found.");
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var graphicsExtent:Extent = GraphicUtil.getGraphicsExtent(featureSet.features);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (graphicsExtent)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; map.extent = graphicsExtent;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp;&amp;nbsp; function onFault(info:Object, token:Object = null):void
&amp;nbsp;&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Alert.show(info.toString());
&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp; }

&amp;lt;esri:QueryTask id="queryTask"
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; url="http://gis2.stallingsnc.org:8084/Stallings/rest/services/Flex2/ParcelsAgain/MapServer/0"
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; useAMF="false"/&amp;gt;
&amp;nbsp; 
&amp;nbsp; &amp;lt;esri:Query id="query"
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; where="ACCTNO like '%{fText.text}%'"
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; outSpatialReference="{map.spatialReference}"
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; returnGeometry="true"
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; text="{fText.text}"&amp;gt;
&amp;nbsp;&amp;nbsp; &amp;lt;esri:outFields&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;fx:String&amp;gt;ACCTNO&amp;lt;/fx:String&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;fx:String&amp;gt;Owner1&amp;lt;/fx:String&amp;gt;
&amp;nbsp;&amp;nbsp; &amp;lt;/esri:outFields&amp;gt;
&amp;nbsp; &amp;lt;/esri:Query&amp;gt;
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 12:59:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/spatial-query-of-multiple-services/m-p/265498#M6237</guid>
      <dc:creator>ShannonMartel</dc:creator>
      <dc:date>2021-12-11T12:59:13Z</dc:date>
    </item>
    <item>
      <title>Re: Spatial query of multiple services</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/spatial-query-of-multiple-services/m-p/265499#M6238</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Shannon,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; Sorry no example of this put together right now but to reuse the same queryTask all you would have to do is in the onResults portion of your code change the: &lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;queryTask.url = "someother url";
queryTask.execute(query2, new AsyncResponder(onResult2, onFault));
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Notice the query2 and onResult2 that way you can send a different where clause and respond to results differently.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 12:59:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/spatial-query-of-multiple-services/m-p/265499#M6238</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2021-12-11T12:59:16Z</dc:date>
    </item>
  </channel>
</rss>

