<?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: Removing a graphic element from a feature set in ArcGIS API for Flex Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/removing-a-graphic-element-from-a-feature-set/m-p/334920#M8033</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;FeatureSet.features is a normal array, so you can use pop() etc to remove elements from that array.&amp;nbsp; &lt;A href="http://resources.arcgis.com/en/help/flex-api/apiref/com/esri/ags/FeatureSet.html#features"&gt;http://resources.arcgis.com/en/help/flex-api/apiref/com/esri/ags/FeatureSet.html#features&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;See for example &lt;A href="http://resources.arcgis.com/en/help/flex-api/samples/index.html#/Basic_Routing/01nq0000005p000000/"&gt;http://resources.arcgis.com/en/help/flex-api/samples/index.html#/Basic_Routing/01nq0000005p000000/&lt;/A&gt;&lt;BR /&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro"&gt;map.defaultGraphicsLayer.remove(stops.features.pop());&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN style="font-style:italic;"&gt;"Three methods of the Array class--pop(), shift(), and splice()--allow you to remove elements from an array. The pop() method removes an element from the end of the array. In other words, it removes the element at the highest index number. The shift() method removes an element from the beginning of the array, which means that it always removes the element at index number 0. The splice() method, which can also be used to insert elements, removes an arbitrary number of elements starting at the index number specified by the first argument sent to the method."&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://livedocs.adobe.com/flex/3/html/help.html?content=10_Lists_of_data_2.html"&gt;http://livedocs.adobe.com/flex/3/html/help.html?content=10_Lists_of_data_2.html&lt;/A&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi bjorn,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you so much for answering my question. Actually what I want to do is this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;for each (var g:Graphic in featureSet.features)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; if (g has specific criteria)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; remove it from the featureSet.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;So I would like to know which of the three methods is the best for this situation.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you very much for your help.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 02 Jul 2012 15:12:45 GMT</pubDate>
    <dc:creator>AlaeddineSaadaoui</dc:creator>
    <dc:date>2012-07-02T15:12:45Z</dc:date>
    <item>
      <title>Removing a graphic element from a feature set</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/removing-a-graphic-element-from-a-feature-set/m-p/334918#M8031</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;SPAN&gt;I would like to know how I could remove a graphic element from a feature set.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Jul 2012 14:32:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/removing-a-graphic-element-from-a-feature-set/m-p/334918#M8031</guid>
      <dc:creator>AlaeddineSaadaoui</dc:creator>
      <dc:date>2012-07-02T14:32:06Z</dc:date>
    </item>
    <item>
      <title>Re: Removing a graphic element from a feature set</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/removing-a-graphic-element-from-a-feature-set/m-p/334919#M8032</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;FeatureSet.features is a normal array, so you can use pop() etc to remove elements from that array.&amp;nbsp; &lt;/SPAN&gt;&lt;A href="http://resources.arcgis.com/en/help/flex-api/apiref/com/esri/ags/FeatureSet.html#features"&gt;http://resources.arcgis.com/en/help/flex-api/apiref/com/esri/ags/FeatureSet.html#features&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;See for example &lt;/SPAN&gt;&lt;A href="http://resources.arcgis.com/en/help/flex-api/samples/index.html#/Basic_Routing/01nq0000005p000000/"&gt;http://resources.arcgis.com/en/help/flex-api/samples/index.html#/Basic_Routing/01nq0000005p000000/&lt;/A&gt;&lt;BR /&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro"&gt;map.defaultGraphicsLayer.remove(stops.features.pop());&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN style="font-style:italic;"&gt;"Three methods of the Array class--pop(), shift(), and splice()--allow you to remove elements from an array. The pop() method removes an element from the end of the array. In other words, it removes the element at the highest index number. The shift() method removes an element from the beginning of the array, which means that it always removes the element at index number 0. The splice() method, which can also be used to insert elements, removes an arbitrary number of elements starting at the index number specified by the first argument sent to the method."&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://livedocs.adobe.com/flex/3/html/help.html?content=10_Lists_of_data_2.html"&gt;http://livedocs.adobe.com/flex/3/html/help.html?content=10_Lists_of_data_2.html&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Jul 2012 14:51:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/removing-a-graphic-element-from-a-feature-set/m-p/334919#M8032</guid>
      <dc:creator>BjornSvensson</dc:creator>
      <dc:date>2012-07-02T14:51:36Z</dc:date>
    </item>
    <item>
      <title>Re: Removing a graphic element from a feature set</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/removing-a-graphic-element-from-a-feature-set/m-p/334920#M8033</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;FeatureSet.features is a normal array, so you can use pop() etc to remove elements from that array.&amp;nbsp; &lt;A href="http://resources.arcgis.com/en/help/flex-api/apiref/com/esri/ags/FeatureSet.html#features"&gt;http://resources.arcgis.com/en/help/flex-api/apiref/com/esri/ags/FeatureSet.html#features&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;See for example &lt;A href="http://resources.arcgis.com/en/help/flex-api/samples/index.html#/Basic_Routing/01nq0000005p000000/"&gt;http://resources.arcgis.com/en/help/flex-api/samples/index.html#/Basic_Routing/01nq0000005p000000/&lt;/A&gt;&lt;BR /&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro"&gt;map.defaultGraphicsLayer.remove(stops.features.pop());&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN style="font-style:italic;"&gt;"Three methods of the Array class--pop(), shift(), and splice()--allow you to remove elements from an array. The pop() method removes an element from the end of the array. In other words, it removes the element at the highest index number. The shift() method removes an element from the beginning of the array, which means that it always removes the element at index number 0. The splice() method, which can also be used to insert elements, removes an arbitrary number of elements starting at the index number specified by the first argument sent to the method."&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://livedocs.adobe.com/flex/3/html/help.html?content=10_Lists_of_data_2.html"&gt;http://livedocs.adobe.com/flex/3/html/help.html?content=10_Lists_of_data_2.html&lt;/A&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi bjorn,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you so much for answering my question. Actually what I want to do is this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;for each (var g:Graphic in featureSet.features)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; if (g has specific criteria)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; remove it from the featureSet.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;So I would like to know which of the three methods is the best for this situation.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you very much for your help.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Jul 2012 15:12:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/removing-a-graphic-element-from-a-feature-set/m-p/334920#M8033</guid>
      <dc:creator>AlaeddineSaadaoui</dc:creator>
      <dc:date>2012-07-02T15:12:45Z</dc:date>
    </item>
    <item>
      <title>Re: Removing a graphic element from a feature set</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/removing-a-graphic-element-from-a-feature-set/m-p/334921#M8034</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You'll need to use splice(). See:&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/Array.html#splice()"&gt;http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/Array.html#splice()&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Jul 2012 15:38:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/removing-a-graphic-element-from-a-feature-set/m-p/334921#M8034</guid>
      <dc:creator>DasaPaddock</dc:creator>
      <dc:date>2012-07-02T15:38:27Z</dc:date>
    </item>
  </channel>
</rss>

