<?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 deactivate toolbar (esri.toolbars.draw) when navigation tool is clicked? in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-deactivate-toolbar-esri-toolbars-draw-when/m-p/677626#M63187</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks Heming for the reply.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This should work for me.I will try it.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 22 Oct 2011 14:20:43 GMT</pubDate>
    <dc:creator>SanajyJadhav</dc:creator>
    <dc:date>2011-10-22T14:20:43Z</dc:date>
    <item>
      <title>How to deactivate toolbar (esri.toolbars.draw) when navigation tool is clicked?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-deactivate-toolbar-esri-toolbars-draw-when/m-p/677624#M63185</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 have Navigation toolbar and normal toolbar (esri.toolbars.draw) to draw various shapes of graphics.When I click normal toolbar, I can draw my graphics, that is fine.However,if immediately after this, I click on any navigation tool (say zoom in), previously draw graphics is also drawn along with zoom in rectanlge.So map is zoomed in but graphics is also drawn.I have to deactivate the normal toolbar (the one that draws graphics.)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Since, nav toolbar tools are mere calls to API methods, how can a catch the click event of any tool on the navigation toolbar? In this event, I would call deactivate method. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am very new to JS API, so any help is much appreciated.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Sanjay.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Oct 2011 17:02:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-deactivate-toolbar-esri-toolbars-draw-when/m-p/677624#M63185</guid>
      <dc:creator>SanajyJadhav</dc:creator>
      <dc:date>2011-10-19T17:02:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to deactivate toolbar (esri.toolbars.draw) when navigation tool is clicked?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-deactivate-toolbar-esri-toolbars-draw-when/m-p/677625#M63186</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt; Hi,&amp;nbsp; &lt;BR /&gt; &lt;BR /&gt;I have Navigation toolbar and normal toolbar (esri.toolbars.draw) to draw various shapes of graphics.When I click normal toolbar, I can draw my graphics, that is fine.However,if immediately after this, I click on any navigation tool (say zoom in), previously draw graphics is also drawn along with zoom in rectanlge.So map is zoomed in but graphics is also drawn.I have to deactivate the normal toolbar (the one that draws graphics.)&amp;nbsp; &lt;BR /&gt; &lt;BR /&gt;Since, nav toolbar tools are mere calls to API methods, how can a catch the click event of any tool on the navigation toolbar? In this event, I would call deactivate method.&amp;nbsp;&amp;nbsp; &lt;BR /&gt; &lt;BR /&gt;I am very new to JS API, so any help is much appreciated.&amp;nbsp; &lt;BR /&gt; &lt;BR /&gt;Regards,&amp;nbsp; &lt;BR /&gt;Sanjay.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt;When you activate the draw toolbar, API will automatically deactivate the map navigation. It does not, however, do the opposite way. But you can easily add one statement to deactivate your drawing toolbar when you activate your navigation bar. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;For example, in &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/webapi/javascript/arcgis/help/jssamples/toolbar_navigation.html" rel="nofollow"&gt;http://help.arcgis.com/en/webapi/javascript/arcgis/help/jssamples/toolbar_navigation.html&lt;/A&gt;&lt;SPAN&gt;. you could add drawingtoolbar.deactivate() in onClick:function(){navToolbar.activate(esri.toolbars.Navigation.ZOOM_IN);&lt;/SPAN&gt;&lt;SPAN style="color:&amp;quot;red&amp;quot;;"&gt;drawingtoolbar.deactivate();&lt;/SPAN&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Oct 2011 18:33:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-deactivate-toolbar-esri-toolbars-draw-when/m-p/677625#M63186</guid>
      <dc:creator>HemingZhu</dc:creator>
      <dc:date>2011-10-19T18:33:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to deactivate toolbar (esri.toolbars.draw) when navigation tool is clicked?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-deactivate-toolbar-esri-toolbars-draw-when/m-p/677626#M63187</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks Heming for the reply.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This should work for me.I will try it.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 22 Oct 2011 14:20:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-deactivate-toolbar-esri-toolbars-draw-when/m-p/677626#M63187</guid>
      <dc:creator>SanajyJadhav</dc:creator>
      <dc:date>2011-10-22T14:20:43Z</dc:date>
    </item>
  </channel>
</rss>

