<?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: Polygon.contains throws a script timeout error in ArcGIS Viewer for Flex Questions</title>
    <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/polygon-contains-throws-a-script-timeout-error/m-p/700428#M21357</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I found, that it is not the polygon.contains method , but rather a long running process, which is causing the flash time out error. Possibly reducing the number of steps will resolve the problem. is there a way to reduce the number of for loops(1st and 2nd ),since it seems redundant only for doing a p!=q&amp;nbsp; Any help is appreciated.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 07 Jun 2013 00:08:11 GMT</pubDate>
    <dc:creator>PriyaRam</dc:creator>
    <dc:date>2013-06-07T00:08:11Z</dc:date>
    <item>
      <title>Polygon.contains throws a script timeout error</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/polygon-contains-throws-a-script-timeout-error/m-p/700427#M21356</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The Polygon.contains method throws a script timeout error for certain polygons . I'm using esri flex viewer 2.5 and please let me know, how i can get around the issue.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;for(var p:Number =0; p &amp;lt; _polyResult.rings.length; p++)
{
 var _polygonSingleR:Polygon = new Polygon();
 _polygonSingleR.rings = [];
 _polygonSingleR.rings.push(_polyResult.rings&lt;P&gt;);
 _polygonSingleR.spatialReference = _spatialReference;
&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;nbsp; for(var q:Number =0; q &amp;lt; _polyResult.rings.length; q++)
&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp; if(p != q)
&amp;nbsp; {
&amp;nbsp; var _arrMapPoints:Array = _polyResult.rings&lt;Q&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; var _temp:Number = 0;
&amp;nbsp; for(var r:Number =0; r &amp;lt; _arrMapPoints.length; r++)
 {
&amp;nbsp;&amp;nbsp; var _mapPoint:MapPoint = _arrMapPoints&lt;R&gt; as MapPoint;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp; if(_polygonSingleR.contains(_mapPoint))
&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp; _temp++;
&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;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(_temp == _arrMapPoints.length)
&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; _arrValidatedGaps.push(_polyResult.rings&lt;Q&gt;);
&amp;nbsp; }
&amp;nbsp; }
 }
 }&lt;/Q&gt;&lt;/R&gt;&lt;/Q&gt;&lt;/P&gt;&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Jun 2013 15:37:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/polygon-contains-throws-a-script-timeout-error/m-p/700427#M21356</guid>
      <dc:creator>PriyaRam</dc:creator>
      <dc:date>2013-06-04T15:37:59Z</dc:date>
    </item>
    <item>
      <title>Re: Polygon.contains throws a script timeout error</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/polygon-contains-throws-a-script-timeout-error/m-p/700428#M21357</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I found, that it is not the polygon.contains method , but rather a long running process, which is causing the flash time out error. Possibly reducing the number of steps will resolve the problem. is there a way to reduce the number of for loops(1st and 2nd ),since it seems redundant only for doing a p!=q&amp;nbsp; Any help is appreciated.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Jun 2013 00:08:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/polygon-contains-throws-a-script-timeout-error/m-p/700428#M21357</guid>
      <dc:creator>PriyaRam</dc:creator>
      <dc:date>2013-06-07T00:08:11Z</dc:date>
    </item>
    <item>
      <title>Re: Polygon.contains throws a script timeout error</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/polygon-contains-throws-a-script-timeout-error/m-p/700429#M21358</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;What is the use case here? What is that code block supposed to be checking?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Jun 2013 13:18:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/polygon-contains-throws-a-script-timeout-error/m-p/700429#M21358</guid>
      <dc:creator>GISDev1</dc:creator>
      <dc:date>2013-06-07T13:18:49Z</dc:date>
    </item>
    <item>
      <title>Re: Polygon.contains throws a script timeout error</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/polygon-contains-throws-a-script-timeout-error/m-p/700430#M21359</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;it is supposed to find the gaps between polygons.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Jul 2013 18:31:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/polygon-contains-throws-a-script-timeout-error/m-p/700430#M21359</guid>
      <dc:creator>PriyaRam</dc:creator>
      <dc:date>2013-07-01T18:31:30Z</dc:date>
    </item>
  </channel>
</rss>

