<?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 Feature from List: Issues with dataProvider attributes in ArcGIS API for Flex Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/zoom-to-feature-from-list-issues-with-dataprovider/m-p/124660#M2960</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I had a similar problem and this was how I solved it&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;try changing routeList.dataProvider = new ArrayCollection(queryTask.executeLastResult.features);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;to routeList.dataProvider = new ArrayList(event.featureSet.features); and then apply an itemrenderer to your list &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;s:itemRenderer&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;fx:Component&amp;gt;&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;lt;s:ItemRenderer&amp;gt;&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;&amp;nbsp; &amp;lt;s:Label height="20" left="5" text="{data.attributes.NAME}" verticalAlign="middle"/&amp;gt;&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;lt;/s:ItemRenderer&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/fx:Component&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;/s:itemRenderer&amp;gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 22 Apr 2014 13:21:44 GMT</pubDate>
    <dc:creator>AaronNash1</dc:creator>
    <dc:date>2014-04-22T13:21:44Z</dc:date>
    <item>
      <title>Zoom to Feature from List: Issues with dataProvider attributes</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/zoom-to-feature-from-list-issues-with-dataprovider/m-p/124659#M2959</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Greetings,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; Here is what I'm working on.&amp;nbsp; We have a list of Bus Routes.&amp;nbsp; When a user clicks on a Bus Route from the list it calls a MouseEvent that zooms to that particular route.&amp;nbsp; I can get it to zoom to the route but the problem is with how the List is populated.&amp;nbsp; Since the List is populating from the queryTask.executeLastResult.features it's populating the List with these long named features from what I can tell.&amp;nbsp; What I want it to do is populate the List with the NAME attribute that stores the Route Name.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have provided the code below of how I created the list, and then the functions that I seem to be stuck on.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have also created a &amp;lt;esri:GraphicsLayer id="myGraphicsLayer"/&amp;gt; inside my &amp;lt;esri:Map&amp;gt; tag if that helps.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I also have the Selected Route changing to a different color but can't seem to reset it back if a new route is selected.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG style="text-decoration: underline;"&gt;Currently this is what gets populated in the LIST for the NAMES: &lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;RTCInteractiveSystemMap.ApplicationSkin3._ApplicationSkin_Group1.contectGroup.BorderContainer6.BorderContainerSkin9.Group10.myMap.LayerContainer12.myGraphicsLayer.Graphic###&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The ### represent the different graphics in the List and change for each record in the list.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I need it to show the NAME attribute of the data.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;private var contentNavigator:ContentNavigator = new ContentNavigator(); &amp;nbsp;&amp;nbsp;&amp;nbsp; protected function doQuery():void {&amp;nbsp; queryTask.execute(query);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; } &amp;nbsp;&amp;nbsp; protected function routeList_clickHandler(event:MouseEvent):void {&amp;nbsp; var currentGraphic:Graphic = List(event.currentTarget).selectedItem as Graphic;&amp;nbsp; contentNavigator.dataProvider = new ArrayList([ currentGraphic ]); &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; currentGraphic.symbol = sls1;&amp;nbsp;&amp;nbsp; myMap.zoomTo(currentGraphic.geometry); } &amp;nbsp;&amp;nbsp;&amp;nbsp; protected function queryTask_executeCompleteHandler(event:QueryEvent):void {&amp;nbsp; myGraphicsLayer.graphicProvider = event.featureSet.features;&amp;nbsp; routeList.dataProvider = new ArrayCollection(queryTask.executeLastResult.features); &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* This is where the List is getting populated but if I change it to ".attributes" instead of features it of course doesn't work */ &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* routeList.LabelField = "NAME"; */ }&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;&amp;lt;s:List id="routeList"&amp;nbsp; &amp;nbsp; x="10" y="10" &amp;nbsp; width="225" height="554" &amp;nbsp; rollOverColor="#CCCCCC" &amp;nbsp; horizontalScrollPolicy="on" &amp;nbsp; visible="{queryTask.executeLastResult !=null}" &amp;nbsp; creationComplete="doQuery()" &amp;nbsp; click="routeList_clickHandler(event)"/&amp;gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Apr 2014 20:55:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/zoom-to-feature-from-list-issues-with-dataprovider/m-p/124659#M2959</guid>
      <dc:creator>JohnRitsko</dc:creator>
      <dc:date>2014-04-21T20:55:19Z</dc:date>
    </item>
    <item>
      <title>Re: Zoom to Feature from List: Issues with dataProvider attributes</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/zoom-to-feature-from-list-issues-with-dataprovider/m-p/124660#M2960</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I had a similar problem and this was how I solved it&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;try changing routeList.dataProvider = new ArrayCollection(queryTask.executeLastResult.features);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;to routeList.dataProvider = new ArrayList(event.featureSet.features); and then apply an itemrenderer to your list &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;s:itemRenderer&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;fx:Component&amp;gt;&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;lt;s:ItemRenderer&amp;gt;&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;&amp;nbsp; &amp;lt;s:Label height="20" left="5" text="{data.attributes.NAME}" verticalAlign="middle"/&amp;gt;&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;lt;/s:ItemRenderer&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/fx:Component&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;/s:itemRenderer&amp;gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Apr 2014 13:21:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/zoom-to-feature-from-list-issues-with-dataprovider/m-p/124660#M2960</guid>
      <dc:creator>AaronNash1</dc:creator>
      <dc:date>2014-04-22T13:21:44Z</dc:date>
    </item>
    <item>
      <title>Re: Zoom to Feature from List: Issues with dataProvider attributes</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/zoom-to-feature-from-list-issues-with-dataprovider/m-p/124661#M2961</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;That worked out great, thank you so very much.&amp;nbsp; Now my only issue is that I have the List with the horizontalScrollPolicy="on" but it still doesn't utilize that and cuts my text as I have shown below.&amp;nbsp; Any ideas on that.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;[ATTACH=CONFIG]33246[/ATTACH]&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;I had a similar problem and this was how I solved it&lt;BR /&gt;&lt;BR /&gt;try changing routeList.dataProvider = new ArrayCollection(queryTask.executeLastResult.features);&lt;BR /&gt;&lt;BR /&gt;to routeList.dataProvider = new ArrayList(event.featureSet.features); and then apply an itemrenderer to your list &lt;BR /&gt;&lt;BR /&gt;&amp;lt;s:itemRenderer&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;fx:Component&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;s:ItemRenderer&amp;gt;&lt;BR /&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;&amp;nbsp; &amp;lt;s:Label height="20" left="5" text="{data.attributes.NAME}" verticalAlign="middle"/&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/s:ItemRenderer&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/fx:Component&amp;gt;&lt;BR /&gt;&amp;lt;/s:itemRenderer&amp;gt;&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Apr 2014 14:12:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/zoom-to-feature-from-list-issues-with-dataprovider/m-p/124661#M2961</guid>
      <dc:creator>JohnRitsko</dc:creator>
      <dc:date>2014-04-22T14:12:25Z</dc:date>
    </item>
  </channel>
</rss>

