<?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: identify task being executed in a  loop, breaks the dojo deferred addCallback in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/identify-task-being-executed-in-a-nbsp-loop-breaks/m-p/118405#M11017</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I can't take credit for that example. I came across that posted somewhere on here or GIS.StackExchange and kept it as a bookmark. I'm not sure who coded it.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 15 Jul 2013 19:41:58 GMT</pubDate>
    <dc:creator>KenBuja</dc:creator>
    <dc:date>2013-07-15T19:41:58Z</dc:date>
    <item>
      <title>identify task being executed in a  loop, breaks the dojo deferred addCallback</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/identify-task-being-executed-in-a-nbsp-loop-breaks/m-p/118402#M11014</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'm running a loop based on the currently visible layers to run an identify function for multiple layers simultaneously.&amp;nbsp; The identify task is working but I can't seem to get the deferred portion right.&amp;nbsp; I tried a .then vs addCallback but the return never updates the deferred object that the call is completed.&amp;nbsp; Any insight would be great.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;idParams.geometry = evt.mapPoint; &amp;nbsp;&amp;nbsp; idParams.mapExtent = map.extent; &amp;nbsp;&amp;nbsp; var feature, lyrIdent = []; &amp;nbsp;&amp;nbsp; for (var j = 0; j &amp;lt; ident.length; j++) { &amp;nbsp;&amp;nbsp;&amp;nbsp; if(ident&lt;J&gt;.url != "http://services.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Light_Gray_Reference/MapServer"){ &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; deferred = ident[1].execute(idParams); &amp;nbsp;&amp;nbsp;&amp;nbsp; } &amp;nbsp;&amp;nbsp;&amp;nbsp; deferred.then(function(response){ &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return dojo.map(response, function(response){ &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var feature = response.feature; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; lyrIdent.push(feature.attributes); &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var template = new esri.InfoTemplate("#"); &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; feature.setInfoTemplate(template); &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return feature; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }); &amp;nbsp;&amp;nbsp;&amp;nbsp; }); &amp;nbsp;&amp;nbsp; } &amp;nbsp;&amp;nbsp; map.infoWindow.setFeatures([ deferred ]); &amp;nbsp;&amp;nbsp; map.infoWindow.show(evt.mapPoint); &amp;nbsp;&amp;nbsp; console.log(lyrIdent); }&lt;/J&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Jul 2013 18:10:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/identify-task-being-executed-in-a-nbsp-loop-breaks/m-p/118402#M11014</guid>
      <dc:creator>NigelAlford</dc:creator>
      <dc:date>2013-07-12T18:10:12Z</dc:date>
    </item>
    <item>
      <title>Re: identify task being executed in a  loop, breaks the dojo deferred addCallback</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/identify-task-being-executed-in-a-nbsp-loop-breaks/m-p/118403#M11015</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Take a look at this &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://jsfiddle.net/URpaW/" rel="nofollow" target="_blank"&gt;Fiddle&lt;/A&gt;&lt;SPAN&gt;, which returns the results from several different map services.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Jul 2013 14:44:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/identify-task-being-executed-in-a-nbsp-loop-breaks/m-p/118403#M11015</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2013-07-15T14:44:32Z</dc:date>
    </item>
    <item>
      <title>Re: identify task being executed in a  loop, breaks the dojo deferred addCallback</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/identify-task-being-executed-in-a-nbsp-loop-breaks/m-p/118404#M11016</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks Ken.&amp;nbsp; I ended up solving this by creating an object literal, but I'm going to dig through your code, I like your organization and display method on the map.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Jul 2013 19:09:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/identify-task-being-executed-in-a-nbsp-loop-breaks/m-p/118404#M11016</guid>
      <dc:creator>NigelAlford</dc:creator>
      <dc:date>2013-07-15T19:09:45Z</dc:date>
    </item>
    <item>
      <title>Re: identify task being executed in a  loop, breaks the dojo deferred addCallback</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/identify-task-being-executed-in-a-nbsp-loop-breaks/m-p/118405#M11017</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I can't take credit for that example. I came across that posted somewhere on here or GIS.StackExchange and kept it as a bookmark. I'm not sure who coded it.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Jul 2013 19:41:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/identify-task-being-executed-in-a-nbsp-loop-breaks/m-p/118405#M11017</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2013-07-15T19:41:58Z</dc:date>
    </item>
  </channel>
</rss>

