<?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 Multiple Polygons on a Graphics Layer in ArcGIS API for Flex Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/multiple-polygons-on-a-graphics-layer/m-p/527431#M11947</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;So i have a graphics layer (gLayer)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;when i draw a polygon onto graphics layer, it works ok&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;when i then select to draw a second, the first point i draw i get the following error&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;RangeError: Error #2006: The supplied index is out of bounds.
 at flash.display::DisplayObjectContainer/addChildAt()
 at mx.core::UIComponent/http://www.adobe.com/2006/flex/mx/internal::$addChildAt()
 at mx.core::UIComponent/addChildAt()
 at com.esri.ags.layers::GraphicsLayer/collectionAddHandler()&lt;C&gt;
 at com.esri.ags.layers::GraphicsLayer/collectionChangeHandler()&lt;C&gt;
 at flash.events::EventDispatcher/dispatchEventFunction()
 at flash.events::EventDispatcher/dispatchEvent()
 at mx.collections::ListCollectionView/dispatchEvent()
 at mx.collections::ListCollectionView/addItemsToView()
 at mx.collections::ListCollectionView/listChangeHandler()
 at flash.events::EventDispatcher/dispatchEventFunction()
 at flash.events::EventDispatcher/dispatchEvent()
 at mx.collections::ArrayList/internalDispatchEvent()
 at mx.collections::ArrayList/addItemAt()
 at mx.collections::ListCollectionView/addItemAt()
 at mx.collections::ListCollectionView/addItem()
 at com.esri.ags.layers::GraphicsLayer/add()&lt;C&gt;
 at com.esri.ags.tools::DrawTool/addGraphic()&lt;C&gt;
 at com.esri.ags.tools::DrawTool/map_clickFirstHandler()&lt;C&gt;
 at flash.events::EventDispatcher/dispatchEventFunction()
 at flash.events::EventDispatcher/dispatchEvent()
 at mx.core::UIComponent/dispatchEvent()
 at com.esri.ags::Map/dispatchMapMouseEvent()&lt;C&gt;
 at com.esri.ags::Map/mouseUpHandler()&lt;C&gt;&lt;/C&gt;&lt;/C&gt;&lt;/C&gt;&lt;/C&gt;&lt;/C&gt;&lt;/C&gt;&lt;/C&gt;&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;BUT, if i do &lt;/SPAN&gt;&lt;PRE class="plain" name="code"&gt;gLayer.clear()&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;SPAN&gt; before hand it works ok&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;any ideas?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 08 Feb 2012 11:42:45 GMT</pubDate>
    <dc:creator>StevenColeman-Williams</dc:creator>
    <dc:date>2012-02-08T11:42:45Z</dc:date>
    <item>
      <title>Multiple Polygons on a Graphics Layer</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/multiple-polygons-on-a-graphics-layer/m-p/527431#M11947</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;So i have a graphics layer (gLayer)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;when i draw a polygon onto graphics layer, it works ok&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;when i then select to draw a second, the first point i draw i get the following error&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;RangeError: Error #2006: The supplied index is out of bounds.
 at flash.display::DisplayObjectContainer/addChildAt()
 at mx.core::UIComponent/http://www.adobe.com/2006/flex/mx/internal::$addChildAt()
 at mx.core::UIComponent/addChildAt()
 at com.esri.ags.layers::GraphicsLayer/collectionAddHandler()&lt;C&gt;
 at com.esri.ags.layers::GraphicsLayer/collectionChangeHandler()&lt;C&gt;
 at flash.events::EventDispatcher/dispatchEventFunction()
 at flash.events::EventDispatcher/dispatchEvent()
 at mx.collections::ListCollectionView/dispatchEvent()
 at mx.collections::ListCollectionView/addItemsToView()
 at mx.collections::ListCollectionView/listChangeHandler()
 at flash.events::EventDispatcher/dispatchEventFunction()
 at flash.events::EventDispatcher/dispatchEvent()
 at mx.collections::ArrayList/internalDispatchEvent()
 at mx.collections::ArrayList/addItemAt()
 at mx.collections::ListCollectionView/addItemAt()
 at mx.collections::ListCollectionView/addItem()
 at com.esri.ags.layers::GraphicsLayer/add()&lt;C&gt;
 at com.esri.ags.tools::DrawTool/addGraphic()&lt;C&gt;
 at com.esri.ags.tools::DrawTool/map_clickFirstHandler()&lt;C&gt;
 at flash.events::EventDispatcher/dispatchEventFunction()
 at flash.events::EventDispatcher/dispatchEvent()
 at mx.core::UIComponent/dispatchEvent()
 at com.esri.ags::Map/dispatchMapMouseEvent()&lt;C&gt;
 at com.esri.ags::Map/mouseUpHandler()&lt;C&gt;&lt;/C&gt;&lt;/C&gt;&lt;/C&gt;&lt;/C&gt;&lt;/C&gt;&lt;/C&gt;&lt;/C&gt;&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;BUT, if i do &lt;/SPAN&gt;&lt;PRE class="plain" name="code"&gt;gLayer.clear()&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;SPAN&gt; before hand it works ok&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;any ideas?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Feb 2012 11:42:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/multiple-polygons-on-a-graphics-layer/m-p/527431#M11947</guid>
      <dc:creator>StevenColeman-Williams</dc:creator>
      <dc:date>2012-02-08T11:42:45Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple Polygons on a Graphics Layer</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/multiple-polygons-on-a-graphics-layer/m-p/527432#M11948</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Steven,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://help.arcgis.com/en/webapi/flex/samples/01nq/01nq00000065000000.htm"&gt;this sample code&lt;/A&gt;&lt;SPAN&gt; works perfectly.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Can you show your code?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;What version of ArcGIS API for Flex is used?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Feb 2012 14:10:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/multiple-polygons-on-a-graphics-layer/m-p/527432#M11948</guid>
      <dc:creator>IvanBespalov</dc:creator>
      <dc:date>2012-02-08T14:10:08Z</dc:date>
    </item>
  </channel>
</rss>

