<?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: How to kill all map click handlers at once in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-kill-all-map-click-handlers-at-once/m-p/596805#M55923</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'll check it out!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 03 Feb 2015 21:16:15 GMT</pubDate>
    <dc:creator>TimWitt2</dc:creator>
    <dc:date>2015-02-03T21:16:15Z</dc:date>
    <item>
      <title>How to kill all map click handlers at once</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-kill-all-map-click-handlers-at-once/m-p/596799#M55917</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Was wondering if there's a working sample or an easy way to just kill all the click handlers for the "map" object, at once.&amp;nbsp;&amp;nbsp; Nuke it from orbit, so to speak.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(i.e. Measure, Identify, Pictometry, Editor, etc all competing). I know how to do them one by one for each different tool but it gets tedious, long and confusing.&amp;nbsp; There should be an esri method on the map object to remove all non-standard handlers (i.e. not counting pan, zoom, dbl click) although I am not aware of one. Didn't see any in a search. But I was wondering if perhaps someone has wired up such a pattern already? As of now I am mucking through trying to keep them from fighting each other one by one.&amp;nbsp; Perhaps something from the dojo or jquery world will help?&amp;nbsp; Hopefully this concept would not affect the standard nav handlers like mousewheel zoom in/out or doubleclick.&amp;nbsp; Perhaps they would have to be explicitly avoided, to preserve these.. not sure how to do it, yet, so I'm wondering if someone else has?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Feb 2015 19:37:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-kill-all-map-click-handlers-at-once/m-p/596799#M55917</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2015-02-03T19:37:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to kill all map click handlers at once</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-kill-all-map-click-handlers-at-once/m-p/596800#M55918</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is a good question. At the moment I turn them off immediately after they have been used.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Feb 2015 19:40:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-kill-all-map-click-handlers-at-once/m-p/596800#M55918</guid>
      <dc:creator>TimWitt2</dc:creator>
      <dc:date>2015-02-03T19:40:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to kill all map click handlers at once</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-kill-all-map-click-handlers-at-once/m-p/596801#M55919</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Tim, good call. That'll work.&amp;nbsp; So glad to have the braintrust here to bounce ideas off. That will do the trick indeed!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I still believe ESRI should consider adding this very nice feature / concept into the API officially.&amp;nbsp; An official method to both remove all click handlers from the map object (including navigation functions like pan and zoom and double click), and an option to remove just non-standard click handlers, i.e. ones we add but not including navigation handlers built-in.&amp;nbsp;&amp;nbsp; I guess there would have to be a system to "register" our handlers in order for this to work... Still, I think it's worth adding to the API, anyone else?&amp;nbsp; Plus, ESRI can release a nice working sample, if they do choose to add it!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Feb 2015 19:46:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-kill-all-map-click-handlers-at-once/m-p/596801#M55919</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2015-02-03T19:46:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to kill all map click handlers at once</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-kill-all-map-click-handlers-at-once/m-p/596802#M55920</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It would be a good idea. It is very annoying when your app has popup windows for feature layers and you try to meassure etc...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Feb 2015 19:49:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-kill-all-map-click-handlers-at-once/m-p/596802#M55920</guid>
      <dc:creator>TimWitt2</dc:creator>
      <dc:date>2015-02-03T19:49:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to kill all map click handlers at once</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-kill-all-map-click-handlers-at-once/m-p/596803#M55921</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yeah. For my last site www.sagis.org I tested on each tool, to see if other tools were active and if so to kill them. And to test if measure is currently active use this snippet:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; measureMode = dojo.query(".esriButton .dijitButtonNode").some(function(node, index, arr) {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (node.childNodes[0].checked) {&lt;/P&gt;&lt;P&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; //at least one of the measure tools is active so disable identify&lt;/P&gt;&lt;P&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; return true;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; });&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (! measureMode) {&lt;/P&gt;&lt;P&gt;///do some stuff only when Measure is not active, such as Identify&lt;/P&gt;&lt;P&gt;};&amp;nbsp; //end of if test for measurement being active&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For other handlers I test like&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 (Pict === undefined || Pict === false) {&lt;/P&gt;&lt;P&gt;where Pict is Pictometry click handler.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Feb 2015 19:59:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-kill-all-map-click-handlers-at-once/m-p/596803#M55921</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2015-02-03T19:59:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to kill all map click handlers at once</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-kill-all-map-click-handlers-at-once/m-p/596804#M55922</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="http://forums.esri.com/Thread.asp?c=158&amp;amp;f=2396&amp;amp;t=280191" title="http://forums.esri.com/Thread.asp?c=158&amp;amp;f=2396&amp;amp;t=280191"&gt;Disable all Dojo Connects?&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This thread while dated and pre-AMD looks helpful and I will investigate this and post results if successful.. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Feb 2015 21:14:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-kill-all-map-click-handlers-at-once/m-p/596804#M55922</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2015-02-03T21:14:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to kill all map click handlers at once</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-kill-all-map-click-handlers-at-once/m-p/596805#M55923</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'll check it out!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Feb 2015 21:16:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-kill-all-map-click-handlers-at-once/m-p/596805#M55923</guid>
      <dc:creator>TimWitt2</dc:creator>
      <dc:date>2015-02-03T21:16:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to kill all map click handlers at once</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-kill-all-map-click-handlers-at-once/m-p/596806#M55924</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The editor tool and the geocoder had a conflict. If I tried to find an address, the editor tool would display a pop-up. If I tried the editor first the address tool would display the editor, but I wrote about a work around in a series I am writing for starter tempates and both widgets are working fine now; if your interested, here is the work around: &lt;A href="https://community.esri.com/migration-blogpost/2413"&gt;Adding an Editor to the Template&lt;/A&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Feb 2015 15:15:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-kill-all-map-click-handlers-at-once/m-p/596806#M55924</guid>
      <dc:creator>ChrisSergent</dc:creator>
      <dc:date>2015-02-04T15:15:47Z</dc:date>
    </item>
  </channel>
</rss>

