<?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: IdentifyTask - complete event in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/identifytask-complete-event/m-p/150351#M13983</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Bhavin,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; That should help. Most of the time I use a var to hold the on event that way I can call remove() on that var.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;var mcEvt = on(vMap, 'click', function(event){ .....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;mcEvt.remove();&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 24 Apr 2015 13:41:26 GMT</pubDate>
    <dc:creator>RobertScheitlin__GISP</dc:creator>
    <dc:date>2015-04-24T13:41:26Z</dc:date>
    <item>
      <title>IdentifyTask - complete event</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/identifytask-complete-event/m-p/150348#M13980</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I wrote following code to show GIS attributes, whenever user clicks on the map. But IdentifyTask - complete event is being called multiple times. I am using ArcGIS JS API 3.9. I am able to see from the fiddler that REST request is fired only once and able to retrieve multiple features attributes. Sometimes, I have seen it is being called single time only even attributes are multiple. How to debug on this inconsistent behavior?&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;vMap.on('click', function(event){&lt;/P&gt;&lt;P&gt;&amp;nbsp; var vIdentifyTask,&lt;/P&gt;&lt;P&gt;&amp;nbsp; vIdentifyParams,&lt;/P&gt;&lt;P&gt;&amp;nbsp; vIdentifyTaskDeferred;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&lt;SPAN style="line-height: 1.5;"&gt; &lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; vIdentifyTask = new IdentifyTask(url),&lt;/P&gt;&lt;P&gt;&amp;nbsp; vIdentifyParams = new IdentifyParameters();&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; vIdentifyParams.tolerance = 3;&lt;/P&gt;&lt;P&gt;&amp;nbsp; vIdentifyParams.returnGeometry = true;&lt;/P&gt;&lt;P&gt;&amp;nbsp; vIdentifyParams.layerIds = [3,4];&lt;/P&gt;&lt;P&gt;&amp;nbsp; vIdentifyParams.width = vMap.width;&lt;/P&gt;&lt;P&gt;&amp;nbsp; vIdentifyParams.height = vMap.height;&lt;/P&gt;&lt;P&gt;&amp;nbsp; vIdentifyParams.geometry = event.mapPoint;&lt;/P&gt;&lt;P&gt;&amp;nbsp; vIdentifyParams.mapExtent = vMap.extent;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; vIdentifyTask.on('complete', showAttributesPopup);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; vIdentifyTask.on('error', showError);&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; vIdentifyTask.execute(vIdentifyParams);&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; function showAttributesPopup(featureResults) {&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //this function is being called multiple times&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;function showError() {&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;});&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Aug 2014 20:11:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/identifytask-complete-event/m-p/150348#M13980</guid>
      <dc:creator>BhavinSanghani</dc:creator>
      <dc:date>2014-08-18T20:11:32Z</dc:date>
    </item>
    <item>
      <title>Re: IdentifyTask - complete event</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/identifytask-complete-event/m-p/150349#M13981</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Bhavin,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Are you adding this line inside a loop?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="javascript" __jive_macro_name="code" class="_jivemacro_uid_14298371584428512 jive_macro_code jive_text_macro" data-renderedposition="92_8_912_16" jivemacro_uid="_14298371584428512"&gt;&lt;P&gt;vMap.on('click', function(event){&lt;/P&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Apr 2015 00:59:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/identifytask-complete-event/m-p/150349#M13981</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2015-04-24T00:59:09Z</dc:date>
    </item>
    <item>
      <title>Re: IdentifyTask - complete event</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/identifytask-complete-event/m-p/150350#M13982</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No, it was not in loop but probably my code was not de-registering 'click' event.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;e.g. I have two map toolbar buttons. One is to draw the line on the map and another is to see the GIS attributes. At a time one button action will remain active. So, in my case, I click on buttonA and register the 'click' event. Then if I click on buttonB and register the 'click' event again but previously registered 'click' event was not getting removed automatically.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To fix it, I am making sure that whenever new events are getting registered, other events have been removed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this will help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Apr 2015 13:36:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/identifytask-complete-event/m-p/150350#M13982</guid>
      <dc:creator>BhavinSanghani</dc:creator>
      <dc:date>2015-04-24T13:36:13Z</dc:date>
    </item>
    <item>
      <title>Re: IdentifyTask - complete event</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/identifytask-complete-event/m-p/150351#M13983</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Bhavin,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; That should help. Most of the time I use a var to hold the on event that way I can call remove() on that var.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;var mcEvt = on(vMap, 'click', function(event){ .....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;mcEvt.remove();&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Apr 2015 13:41:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/identifytask-complete-event/m-p/150351#M13983</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2015-04-24T13:41:26Z</dc:date>
    </item>
    <item>
      <title>Re: IdentifyTask - complete event</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/identifytask-complete-event/m-p/150352#M13984</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, I did the same to fix the issue.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Apr 2015 13:54:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/identifytask-complete-event/m-p/150352#M13984</guid>
      <dc:creator>BhavinSanghani</dc:creator>
      <dc:date>2015-04-24T13:54:41Z</dc:date>
    </item>
  </channel>
</rss>

