<?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 Identify Tool and Measurement Tool Events in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/identify-tool-and-measurement-tool-events/m-p/630775#M58850</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm building an application that has the ability to perform measurement through the Measurement Tool along with identify functionality in 2.3 of the API.&amp;nbsp; Both tools work with the map.click event.&amp;nbsp; I understand the mechanics of how to stop an event so that for instance when the user clicks the map to perform an identify that it doesn't also perform a measurement.&amp;nbsp; However, with the measure tools I don't see any exposed events that would allow me to stop an event.&amp;nbsp; For example, when the user clicks the Measure Distance tool and then clicks the map to define the first point it also attempt to perform an identify and vice versa.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Anyone know how to handle this?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Eric Pimpler&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;GeoSpatial Training Services, Inc.&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://www.geospatialtraining.com"&gt;http://www.geospatialtraining.com&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://geochalkboard.wordpress.com"&gt;http://geochalkboard.wordpress.com&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 03 Jun 2011 13:50:16 GMT</pubDate>
    <dc:creator>Donald_EricPimpler</dc:creator>
    <dc:date>2011-06-03T13:50:16Z</dc:date>
    <item>
      <title>Identify Tool and Measurement Tool Events</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/identify-tool-and-measurement-tool-events/m-p/630775#M58850</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm building an application that has the ability to perform measurement through the Measurement Tool along with identify functionality in 2.3 of the API.&amp;nbsp; Both tools work with the map.click event.&amp;nbsp; I understand the mechanics of how to stop an event so that for instance when the user clicks the map to perform an identify that it doesn't also perform a measurement.&amp;nbsp; However, with the measure tools I don't see any exposed events that would allow me to stop an event.&amp;nbsp; For example, when the user clicks the Measure Distance tool and then clicks the map to define the first point it also attempt to perform an identify and vice versa.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Anyone know how to handle this?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Eric Pimpler&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;GeoSpatial Training Services, Inc.&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://www.geospatialtraining.com"&gt;http://www.geospatialtraining.com&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://geochalkboard.wordpress.com"&gt;http://geochalkboard.wordpress.com&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Jun 2011 13:50:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/identify-tool-and-measurement-tool-events/m-p/630775#M58850</guid>
      <dc:creator>Donald_EricPimpler</dc:creator>
      <dc:date>2011-06-03T13:50:16Z</dc:date>
    </item>
    <item>
      <title>Re: Identify Tool and Measurement Tool Events</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/identify-tool-and-measurement-tool-events/m-p/630776#M58851</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Hi,&lt;BR /&gt;&lt;BR /&gt;I'm building an application that has the ability to perform measurement through the Measurement Tool along with identify functionality in 2.3 of the API.&amp;nbsp; Both tools work with the map.click event.&amp;nbsp; I understand the mechanics of how to stop an event so that for instance when the user clicks the map to perform an identify that it doesn't also perform a measurement.&amp;nbsp; However, with the measure tools I don't see any exposed events that would allow me to stop an event.&amp;nbsp; For example, when the user clicks the Measure Distance tool and then clicks the map to define the first point it also attempt to perform an identify and vice versa.&lt;BR /&gt;&lt;BR /&gt;Anyone know how to handle this?&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;&lt;BR /&gt;Eric Pimpler&lt;BR /&gt;GeoSpatial Training Services, Inc.&lt;BR /&gt;&lt;A href="http://www.geospatialtraining.com"&gt;http://www.geospatialtraining.com&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://geochalkboard.wordpress.com"&gt;http://geochalkboard.wordpress.com&lt;/A&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for the clue on Jian's post on &lt;/SPAN&gt;&lt;A href="http://forums.arcgis.com/threads/31664-How-to-modify-measurement-widget"&gt;http://forums.arcgis.com/threads/31664-How-to-modify-measurement-widget&lt;/A&gt;&lt;SPAN&gt;, it is feasible by code like this;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;var clickMode =true; //globle variable. default as enable click event&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;....&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;dojo.connect(map, "onClick", doIdentify);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;....&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;var measurement = new esri.dijit.Measurement({&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&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; map: map&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}, dojo.byId('measurementDiv'));&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; measurement.startup();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; var distanceBtn = dojo.query('[widgetid=\"distance\"]')[0];&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; dojo.connect(distanceBtn, "onclick", function() { //note: onclick not onClick&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; clickMode =false; //deactivate the click identify event&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;});&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;function doIdentify(evt)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (!clickMode) return;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; else&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .... identify action go here;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; clickMode =true; //reset back&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Jun 2011 16:15:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/identify-tool-and-measurement-tool-events/m-p/630776#M58851</guid>
      <dc:creator>HemingZhu</dc:creator>
      <dc:date>2011-06-03T16:15:42Z</dc:date>
    </item>
    <item>
      <title>Re: Identify Tool and Measurement Tool Events</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/identify-tool-and-measurement-tool-events/m-p/630777#M58852</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Thanks for the clue on Jian's post on &lt;A href="http://forums.arcgis.com/threads/31664-How-to-modify-measurement-widget"&gt;http://forums.arcgis.com/threads/31664-How-to-modify-measurement-widget&lt;/A&gt;, it is feasible by code like this;&lt;BR /&gt;&lt;BR /&gt;var clickMode =true; //globle variable. default as enable click event&lt;BR /&gt;....&lt;BR /&gt;dojo.connect(map, "onClick", doIdentify);&lt;BR /&gt;....&lt;BR /&gt;var measurement = new esri.dijit.Measurement({&lt;BR /&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; map: map&lt;BR /&gt;}, dojo.byId('measurementDiv'));&lt;BR /&gt; measurement.startup();&lt;BR /&gt; var distanceBtn = dojo.query('[widgetid=\"distance\"]')[0];&lt;BR /&gt; dojo.connect(distanceBtn, "onclick", function() { //note: onclick not onClick&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; clickMode =false; //deactivate the click identify event&lt;BR /&gt;});&lt;BR /&gt;...&lt;BR /&gt;&lt;BR /&gt;function doIdentify(evt)&lt;BR /&gt;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (!clickMode) return;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; else&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .... identify action go here;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; clickMode =true; //reset back&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR /&gt;}&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;There are a few issues with this. 1. You are attempting to change the clickMode Global back to TRUE in part of a loop that will never get executed. (if clickMode is false). 2. It looks like clicking the distanceBtn you query for fires multiple click events. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Perhaps a better way to set the bool is checking the 'aria-pressed' property on that toggle button.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In my case, it had the widgetid of 'dijit_form_ToggleButton_1'.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I hope this helps someone.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Aug 2012 19:55:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/identify-tool-and-measurement-tool-events/m-p/630777#M58852</guid>
      <dc:creator>JimWharton</dc:creator>
      <dc:date>2012-08-09T19:55:53Z</dc:date>
    </item>
  </channel>
</rss>

