<?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: Suspending Identify while using Draw Toolbar in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/suspending-identify-while-using-draw-toolbar/m-p/464420#M42941</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks, Derek for the fast response.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have attempted:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;var handler = dojo.connect(map, "onClick", executeIdentifyTask);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;How would I then utilize this variable? Maybe here somewhere?:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;button data-dojo-type="dijit.form.Button" data-dojo-props="onClick:function(){toolbar.activate(esri.toolbars.Draw.POLYGON);map.hideZoomSlider();}"&amp;gt;Polygon&amp;lt;/button&amp;gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks again!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;RGibson&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 30 Jul 2012 20:44:03 GMT</pubDate>
    <dc:creator>Anonymous User</dc:creator>
    <dc:date>2012-07-30T20:44:03Z</dc:date>
    <item>
      <title>Suspending Identify while using Draw Toolbar</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/suspending-identify-while-using-draw-toolbar/m-p/464418#M42939</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Is it possible to suspend the identifyTask initiated via: "dojo.connect(map,"onClick",executeIdentifyTask);" when the user clicks on a button from the Draw toolbar? That is without having to create a separate Identify button on the toolbar?&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;RGibson&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Jul 2012 20:04:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/suspending-identify-while-using-draw-toolbar/m-p/464418#M42939</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2012-07-30T20:04:48Z</dc:date>
    </item>
    <item>
      <title>Re: Suspending Identify while using Draw Toolbar</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/suspending-identify-while-using-draw-toolbar/m-p/464419#M42940</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Yes, dojo.connect returns a handle that you can pass to dojo.disconnect to disconnect an event listener. In this case, pass the handle returned by dojo.connect to dojo.disconnect just before you call toolbar.activate. When you call toolbar.deactivate, re-connect your identify click event listener (and save a reference to the return value of dojo.connect).&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Jul 2012 20:33:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/suspending-identify-while-using-draw-toolbar/m-p/464419#M42940</guid>
      <dc:creator>derekswingley1</dc:creator>
      <dc:date>2012-07-30T20:33:46Z</dc:date>
    </item>
    <item>
      <title>Re: Suspending Identify while using Draw Toolbar</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/suspending-identify-while-using-draw-toolbar/m-p/464420#M42941</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks, Derek for the fast response.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have attempted:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;var handler = dojo.connect(map, "onClick", executeIdentifyTask);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;How would I then utilize this variable? Maybe here somewhere?:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;button data-dojo-type="dijit.form.Button" data-dojo-props="onClick:function(){toolbar.activate(esri.toolbars.Draw.POLYGON);map.hideZoomSlider();}"&amp;gt;Polygon&amp;lt;/button&amp;gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks again!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;RGibson&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Jul 2012 20:44:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/suspending-identify-while-using-draw-toolbar/m-p/464420#M42941</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2012-07-30T20:44:03Z</dc:date>
    </item>
    <item>
      <title>Re: Suspending Identify while using Draw Toolbar</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/suspending-identify-while-using-draw-toolbar/m-p/464421#M42942</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Yes, you'd use your handler variable. Since you need to reference it outside of the function where it's defined, handler needs to be global (or it need to be a property a global object).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I know we do it in some of our samples, but it's generally a bad idea to inline your JS with your markup. Changes (and down the road, maintenance) are much easier when your markup, CSS and JS are each in their places/files.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Jul 2012 20:48:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/suspending-identify-while-using-draw-toolbar/m-p/464421#M42942</guid>
      <dc:creator>derekswingley1</dc:creator>
      <dc:date>2012-07-30T20:48:59Z</dc:date>
    </item>
    <item>
      <title>Re: Suspending Identify while using Draw Toolbar</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/suspending-identify-while-using-draw-toolbar/m-p/464422#M42943</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I attempted this but to no avail....and ideas?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;button data-dojo-type="dijit.form.Button" data-dojo-props="onClick:function(){toolbar.activate(esri.toolbars.Draw.POLYLINE);map.hideZoomSlider();dojo.disconnect(handler);}"&amp;gt;Polyline&amp;lt;/button&amp;gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Jul 2012 20:54:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/suspending-identify-while-using-draw-toolbar/m-p/464422#M42943</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2012-07-30T20:54:58Z</dc:date>
    </item>
    <item>
      <title>Re: Suspending Identify while using Draw Toolbar</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/suspending-identify-while-using-draw-toolbar/m-p/464423#M42944</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;I attempted this but to no avail....and ideas?&lt;BR /&gt;&lt;BR /&gt;&amp;lt;button data-dojo-type="dijit.form.Button" data-dojo-props="onClick:function(){toolbar.activate(esri.toolbars.Draw.POLYLINE);map.hideZoomSlider();dojo.disconnect(handler);}"&amp;gt;Polyline&amp;lt;/button&amp;gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'd put the function up in the js and remove it from your html markup. i'm doing something very similar, disabling onClick listener, enabling onMouseOver listener when load, then the opposite when identify button is clicked. search for my thread "onMouseOver onMouseOut" and you can see my markup.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;something like this&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;//globals var handler; //var to hold event listener var map; var toolbar;&amp;nbsp; function init(){ &amp;nbsp;&amp;nbsp;&amp;nbsp; //define map here &amp;nbsp;&amp;nbsp;&amp;nbsp; //define toolbar here &amp;nbsp;&amp;nbsp;&amp;nbsp; handler = dojo.connect(map,"onClick",executeIdentifyTask); }&amp;nbsp; function initToolbar(){ &amp;nbsp;&amp;nbsp;&amp;nbsp; dojo.disconnect(handler); &amp;nbsp;&amp;nbsp;&amp;nbsp; toolbar.activate(esri.toolbars.Draw.POLYLINE); &amp;nbsp;&amp;nbsp;&amp;nbsp; map.hideZoomSlider(); }&amp;nbsp; dojo.addonload(init);&amp;nbsp; &amp;lt;button data-dojo-type="dijit.form.Button" data-dojo-props="onClick:initToolbar()"&amp;gt;Polyline&amp;lt;/button&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Jul 2012 22:27:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/suspending-identify-while-using-draw-toolbar/m-p/464423#M42944</guid>
      <dc:creator>danbecker</dc:creator>
      <dc:date>2012-07-30T22:27:34Z</dc:date>
    </item>
    <item>
      <title>Re: Suspending Identify while using Draw Toolbar</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/suspending-identify-while-using-draw-toolbar/m-p/464424#M42945</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Gave this a try but the "initToolbar" function is firing as the page loads and not when the button is clicked. And I did place the initToolbar function outside of the "init" function. Thanks.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Jul 2012 13:34:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/suspending-identify-while-using-draw-toolbar/m-p/464424#M42945</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2012-07-31T13:34:07Z</dc:date>
    </item>
    <item>
      <title>Re: Suspending Identify while using Draw Toolbar</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/suspending-identify-while-using-draw-toolbar/m-p/464425#M42946</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Okay, figured this out. Thanks to everyone. The code supplied by dbecker88 is essentially correct but with one revision:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;button data-dojo-type="dijit.form.Button" data-dojo-props="&lt;/SPAN&gt;&lt;STRONG&gt;onClick:initToolbar()&lt;/STRONG&gt;&lt;SPAN&gt;"&amp;gt;Polyline&amp;lt;/button&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;SHOULD BE&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;button data-dojo-type="dijit.form.Button" data-dojo-props="&lt;/SPAN&gt;&lt;STRONG&gt;onClick:function(){initToolbar();}&lt;/STRONG&gt;&lt;SPAN&gt;"&amp;gt;Polyline&amp;lt;/button&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks again for the assistance.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Jul 2012 13:53:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/suspending-identify-while-using-draw-toolbar/m-p/464425#M42946</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2012-07-31T13:53:24Z</dc:date>
    </item>
  </channel>
</rss>

