<?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 moving from flex 3 to flex 4: graphic layer vs feature layer in ArcGIS API for Flex Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/moving-from-flex-3-to-flex-4-graphic-layer-vs/m-p/267252#M6265</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I had a graphic layer in flex 3 .&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I used querytask and query (using where clause) and&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;queryTask.execute( query, new AsyncResponder( onResultGetAA, onFaultGetAA ));&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;on the successhandler(onResultGetAA), the&amp;nbsp;&amp;nbsp; featureset.features were added to the graphiclayer.graphicprovider..&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Note the layer I am query against is a polygon layer in arcgis rest service&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Now in Flex 4, I wanted to use featurelayer instead of graphic layer for following reasons:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; 1) use mode=snapshot&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; 2) useAMF=true(for arcgis 10 server)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I can use definitionexpression with where clause but I want to add a handler for successful query result where I need to process the featureset.features for other purpose...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;My question is will it be better in terms of performance for using the feature layer in this situation?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Second, If I use feature layer, how I can add a handler for successful query result (as was in querytask)? &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks..&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 14 Sep 2010 17:02:58 GMT</pubDate>
    <dc:creator>abukhan</dc:creator>
    <dc:date>2010-09-14T17:02:58Z</dc:date>
    <item>
      <title>moving from flex 3 to flex 4: graphic layer vs feature layer</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/moving-from-flex-3-to-flex-4-graphic-layer-vs/m-p/267252#M6265</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I had a graphic layer in flex 3 .&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I used querytask and query (using where clause) and&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;queryTask.execute( query, new AsyncResponder( onResultGetAA, onFaultGetAA ));&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;on the successhandler(onResultGetAA), the&amp;nbsp;&amp;nbsp; featureset.features were added to the graphiclayer.graphicprovider..&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Note the layer I am query against is a polygon layer in arcgis rest service&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Now in Flex 4, I wanted to use featurelayer instead of graphic layer for following reasons:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; 1) use mode=snapshot&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; 2) useAMF=true(for arcgis 10 server)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I can use definitionexpression with where clause but I want to add a handler for successful query result where I need to process the featureset.features for other purpose...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;My question is will it be better in terms of performance for using the feature layer in this situation?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Second, If I use feature layer, how I can add a handler for successful query result (as was in querytask)? &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks..&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Sep 2010 17:02:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/moving-from-flex-3-to-flex-4-graphic-layer-vs/m-p/267252#M6265</guid>
      <dc:creator>abukhan</dc:creator>
      <dc:date>2010-09-14T17:02:58Z</dc:date>
    </item>
    <item>
      <title>Re: moving from flex 3 to flex 4: graphic layer vs feature layer</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/moving-from-flex-3-to-flex-4-graphic-layer-vs/m-p/267253#M6266</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Using a FeatureLayer the way I think you're intending, you would use the definitionExpression of the FL.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Check this example.&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://help.arcgis.com/en/webapi/flex/samples/index.html?sample=FeatureLayer_Search"&gt;http://help.arcgis.com/en/webapi/flex/samples/index.html?sample=FeatureLayer_Search&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Another method, that will work the way you have in your post is to use featureLayer.queryFeatures(), which basically sends its params to a queryTask.execute() inside the Featurelayer.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Sep 2010 17:33:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/moving-from-flex-3-to-flex-4-graphic-layer-vs/m-p/267253#M6266</guid>
      <dc:creator>ReneRubalcava</dc:creator>
      <dc:date>2010-09-14T17:33:42Z</dc:date>
    </item>
  </channel>
</rss>

