<?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: zoom to results using query and querytask in ArcGIS API for Flex Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/zoom-to-results-using-query-and-querytask/m-p/759453#M16764</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi all,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;As soon as I posted this question, I found the answer.&amp;nbsp; I'm not sure if this is the most efficient way, but it works.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;After the query has returned the selected features set the first one to&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;var selectedExtent:Extent;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;var newGraphic:Graphic=featureSet.features[0];&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;selectedExtent=Polygon(newGraphic.geometry).extent;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;then loop thru the results combining the extents of each polygon as you loop&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;for each (var myGraphic:Graphic in featureSet.features )&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; selectedExtent=selectedExtent.union(Polygon(myGraphic.geometry).extent);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;then zoom to the new extent, or a zoom factor, or whatever you choose.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanx forum,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Eddie&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 07 Sep 2010 13:26:27 GMT</pubDate>
    <dc:creator>eddiequinlan</dc:creator>
    <dc:date>2010-09-07T13:26:27Z</dc:date>
    <item>
      <title>zoom to results using query and querytask</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/zoom-to-results-using-query-and-querytask/m-p/759452#M16763</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi all,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;On my map, I'm trying to zoom to the extent of my selected features after performing a query.&amp;nbsp; I've read the posts regarding this issue by using "findtask" and "findparameters" and then looping thru the results.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;However, my code has already been written to select features by geometry/attributes.&amp;nbsp; I'd like to zoom to the selected features without having to write my code all over using "findtask".&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;thanx,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Eddie&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;GIS Coord&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Okaloosa County&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Sep 2010 12:50:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/zoom-to-results-using-query-and-querytask/m-p/759452#M16763</guid>
      <dc:creator>eddiequinlan</dc:creator>
      <dc:date>2010-09-07T12:50:58Z</dc:date>
    </item>
    <item>
      <title>Re: zoom to results using query and querytask</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/zoom-to-results-using-query-and-querytask/m-p/759453#M16764</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi all,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;As soon as I posted this question, I found the answer.&amp;nbsp; I'm not sure if this is the most efficient way, but it works.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;After the query has returned the selected features set the first one to&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;var selectedExtent:Extent;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;var newGraphic:Graphic=featureSet.features[0];&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;selectedExtent=Polygon(newGraphic.geometry).extent;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;then loop thru the results combining the extents of each polygon as you loop&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;for each (var myGraphic:Graphic in featureSet.features )&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; selectedExtent=selectedExtent.union(Polygon(myGraphic.geometry).extent);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;then zoom to the new extent, or a zoom factor, or whatever you choose.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanx forum,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Eddie&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Sep 2010 13:26:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/zoom-to-results-using-query-and-querytask/m-p/759453#M16764</guid>
      <dc:creator>eddiequinlan</dc:creator>
      <dc:date>2010-09-07T13:26:27Z</dc:date>
    </item>
    <item>
      <title>Re: zoom to results using query and querytask</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/zoom-to-results-using-query-and-querytask/m-p/759454#M16765</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Eddie,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In the samples section you may find a more efficient solution.&amp;nbsp; Look under Query Tasks --&amp;gt; Zoom to Query result for a little different approach.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Good Luck,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;-Dan&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Sep 2010 13:36:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/zoom-to-results-using-query-and-querytask/m-p/759454#M16765</guid>
      <dc:creator>DanJensen</dc:creator>
      <dc:date>2010-09-07T13:36:21Z</dc:date>
    </item>
  </channel>
</rss>

