<?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: swapping map.on click events for measurement tool vs info in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/swapping-map-on-click-events-for-measurement-tool/m-p/255419#M23710</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Lo Wolhar,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;However when the measure ends and I'm not sure if this should be when the close my form with the widget or on measure-end I am not able to re add my infoTemplate&amp;nbsp; clickListener back in to show the info Window.&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Can you show us the code that you are using for this?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 01 Jun 2015 22:05:38 GMT</pubDate>
    <dc:creator>RobertScheitlin__GISP</dc:creator>
    <dc:date>2015-06-01T22:05:38Z</dc:date>
    <item>
      <title>swapping map.on click events for measurement tool vs info</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/swapping-map-on-click-events-for-measurement-tool/m-p/255418#M23709</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a map with a clickListener that is setup initially via map.on to handle the standard infoTemplate information for layers that are turned on in an info WIndow. When I try to put the measurement tool on my page (using 3.13)&amp;nbsp; I use a .remove for the click listener when the tool opens and am able to do the measure events no problem.&amp;nbsp; &lt;/P&gt;&lt;P&gt;However when the measure ends and I'm not sure if this should be when the close my form with the widget or on measure-end I am not able to re add my infoTemplate&amp;nbsp; clickListener back in to show the info Window. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've seen a couple of examples that use dojo aspect or dojo connect but I gather dojo connect and disconnect are old.&amp;nbsp; I can't seem to hit on a good way to do it or figure out the placement. Does anyone out there have a working measurement/info swap method that works? I'm thinking I may have to scrap the requested measurement functionality if its not possible.&amp;nbsp; I'm using bootstrap / jquery / 3.13 with some amount of dojo mixed in to use some of the easier esri widget items where needed.&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Jun 2015 21:25:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/swapping-map-on-click-events-for-measurement-tool/m-p/255418#M23709</guid>
      <dc:creator>lowolhar</dc:creator>
      <dc:date>2015-06-01T21:25:01Z</dc:date>
    </item>
    <item>
      <title>Re: swapping map.on click events for measurement tool vs info</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/swapping-map-on-click-events-for-measurement-tool/m-p/255419#M23710</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Lo Wolhar,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;However when the measure ends and I'm not sure if this should be when the close my form with the widget or on measure-end I am not able to re add my infoTemplate&amp;nbsp; clickListener back in to show the info Window.&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Can you show us the code that you are using for this?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Jun 2015 22:05:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/swapping-map-on-click-events-for-measurement-tool/m-p/255419#M23710</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2015-06-01T22:05:38Z</dc:date>
    </item>
    <item>
      <title>Re: swapping map.on click events for measurement tool vs info</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/swapping-map-on-click-events-for-measurement-tool/m-p/255420#M23711</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;BR /&gt; &lt;BR /&gt;&amp;nbsp; I had face the same issue and the solve was simple .. &lt;BR /&gt; I define a public Boolean variable and change the value each time I switch measurement On/Off&amp;nbsp; to know the current click map mood ( Measurement vs. InfoWindow )&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;So, before show up the InfoWindow, you have to check if the mood is InfoWindow mood in a simple if statement ... &lt;BR /&gt;That will prevent the conflict of the click event handlers. And its works fine with us.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this help you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards, &lt;BR /&gt;Yusuf&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Jun 2015 06:51:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/swapping-map-on-click-events-for-measurement-tool/m-p/255420#M23711</guid>
      <dc:creator>YousefQuran</dc:creator>
      <dc:date>2015-06-03T06:51:44Z</dc:date>
    </item>
    <item>
      <title>Re: swapping map.on click events for measurement tool vs info</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/swapping-map-on-click-events-for-measurement-tool/m-p/255421#M23712</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Take a look at &lt;A href="http://dojotoolkit.org/reference-guide/1.10/dojo/on.html"&gt;dojo/on&lt;/A&gt; and its &lt;A href="http://dojotoolkit.org/reference-guide/1.10/dojo/on.html#pausable"&gt;pausable&lt;/A&gt; method. This allows you to pause and resume the event listeners without needing to remove them and add them back in.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Jun 2015 12:54:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/swapping-map-on-click-events-for-measurement-tool/m-p/255421#M23712</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2015-06-03T12:54:19Z</dc:date>
    </item>
    <item>
      <title>Re: swapping map.on click events for measurement tool vs info</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/swapping-map-on-click-events-for-measurement-tool/m-p/255422#M23713</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can use map.setInfoWindowOnClick to enable/disable info window clicks for the map. Here's an example that disables info windows when a measure tool is activated and re-enables them when the tool is deactivated. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
query(".esriMeasurement .dijitButtonNode").on("click", lang.hitch(this, function(e){
&amp;nbsp;&amp;nbsp; var tool = measureWidget.getTool();
&amp;nbsp;&amp;nbsp; if(tool){
&amp;nbsp;&amp;nbsp;&amp;nbsp; this.map.setInfoWindowOnClick(false);
&amp;nbsp;&amp;nbsp; }else{
&amp;nbsp;&amp;nbsp;&amp;nbsp; this.map.setInfoWindowOnClick(true);
&amp;nbsp;&amp;nbsp; }
}));
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 12:36:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/swapping-map-on-click-events-for-measurement-tool/m-p/255422#M23713</guid>
      <dc:creator>KellyHutchins</dc:creator>
      <dc:date>2021-12-11T12:36:24Z</dc:date>
    </item>
  </channel>
</rss>

