<?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 zoom on parcel after a click on it in DataGrid in ArcGIS API for Flex Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/zoom-on-parcel-after-a-click-on-it-in-datagrid/m-p/113227#M2661</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;We are building an application with Flex and use the modified "Find Task and Zooming in to results" example to search for parcels and the results are displayed in a DataGrid on the right. The problem is that most of the times the results are more than 10-20 and it zooms in on half of the map (there is no other way to show all the found results). But the users will want to see a single result and that leads me to my question: Is there a way for the user to click on one of the FindTask results in the DataGrid and then the application to zoom in on that selected parcel?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Red some threads in the old forum but they all are about query and zoom and I'm not that skilled to rework the example to work with a click.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks so much!&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Deian Kiriazov&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;GIS Varna&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 16 Jun 2010 12:31:35 GMT</pubDate>
    <dc:creator>varnavarna</dc:creator>
    <dc:date>2010-06-16T12:31:35Z</dc:date>
    <item>
      <title>zoom on parcel after a click on it in DataGrid</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/zoom-on-parcel-after-a-click-on-it-in-datagrid/m-p/113227#M2661</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;We are building an application with Flex and use the modified "Find Task and Zooming in to results" example to search for parcels and the results are displayed in a DataGrid on the right. The problem is that most of the times the results are more than 10-20 and it zooms in on half of the map (there is no other way to show all the found results). But the users will want to see a single result and that leads me to my question: Is there a way for the user to click on one of the FindTask results in the DataGrid and then the application to zoom in on that selected parcel?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Red some threads in the old forum but they all are about query and zoom and I'm not that skilled to rework the example to work with a click.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks so much!&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Deian Kiriazov&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;GIS Varna&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Jun 2010 12:31:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/zoom-on-parcel-after-a-click-on-it-in-datagrid/m-p/113227#M2661</guid>
      <dc:creator>varnavarna</dc:creator>
      <dc:date>2010-06-16T12:31:35Z</dc:date>
    </item>
    <item>
      <title>Re: zoom on parcel after a click on it in DataGrid</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/zoom-on-parcel-after-a-click-on-it-in-datagrid/m-p/113228#M2662</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I guess not alot of people have faced the problem with centering after a click in DataGrid. I've been searching for more info on the problem and foud this interesting thread:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://forums.arcgis.com/threads/2047-Zoom-to-selected-row-of-DataGrid-in-QueryBuilderWidget-of-FlexViewre1.3?highlight=query+problem"&gt;http://forums.arcgis.com/threads/2047-Zoom-to-selected-row-of-DataGrid-in-QueryBuilderWidget-of-FlexViewre1.3?highlight=query+problem&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;There is a similarity in the tasks but in my case - no need for query identify after zooming to the clicked parcel and all the objects are polygons so no need to choose between polygon, point or polyline.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Tried to modify the code from the thread for my needs but nothing happens when I click on the DataGrid entries:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;private function findGraphicByAttribute(attributes:Object):Graphic&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; for each( var graphic:Graphic in myGraphicsLayer.graphicProvider)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if ( graphic.attributes === attributes)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return graphic;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return null;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; }&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;private function onItemClick(event:ListEvent):void&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; var gra:Graphic = findGraphicByAttribute(event.itemRenderer.data);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; var pt:MapPoint = null;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&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; pt = new MapPoint();&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pt.x = (gra.geometry.extent.xmax + gra.geometry.extent.xmin) / 2&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; pt.y = (gra.geometry.extent.ymax + gra.geometry.extent.ymin) / 2&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; map.extent = gra.geometry.extent;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Deian Kiriazov&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;GIS Varna&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Jun 2010 12:43:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/zoom-on-parcel-after-a-click-on-it-in-datagrid/m-p/113228#M2662</guid>
      <dc:creator>varnavarna</dc:creator>
      <dc:date>2010-06-21T12:43:00Z</dc:date>
    </item>
  </channel>
</rss>

