<?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: Problems with Draw Toolbar in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/problems-with-draw-toolbar/m-p/180169#M16693</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks so much! Hopefully I can get my GP task up and running soon now...trying to teach this to myself has been a challenge for sure!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 19 Oct 2012 16:35:41 GMT</pubDate>
    <dc:creator>JessicaKnight1</dc:creator>
    <dc:date>2012-10-19T16:35:41Z</dc:date>
    <item>
      <title>Problems with Draw Toolbar</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/problems-with-draw-toolbar/m-p/180164#M16688</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am attempting to get the draw toolbar to work in my application so I can use it as part of a geoprocessing task. I am just using it for a point feature. I had looked at the samples online and thought I had it sorted out, but apparently I haven't. I have attached my code here. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I keep getting an error saying that my toolbar variable is undefined, but I have it defined earlier in the code. I figure another set of eyes on it may help me see where I have an error. A simple misspelling or something simple is hopefully all that is wrong. I haven't begun really working on the GP task itself yet as I wanted to get this working first. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If I could get any help that would be great. Being a JS coding novice can be frustrating at times...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Oct 2012 18:11:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/problems-with-draw-toolbar/m-p/180164#M16688</guid>
      <dc:creator>JessicaKnight1</dc:creator>
      <dc:date>2012-10-15T18:11:49Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with Draw Toolbar</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/problems-with-draw-toolbar/m-p/180165#M16689</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;try this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;1) put&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;function createToolbar(themap){ &amp;nbsp;&amp;nbsp;&amp;nbsp; toolbar = new esri.toolbars.Draw(map); &amp;nbsp;&amp;nbsp;&amp;nbsp; dojo.connect(toolbar,"onDrawEnd", addToMap); }&amp;nbsp; function addToMap(geometry){ &amp;nbsp;&amp;nbsp;&amp;nbsp; toolbar.deactivate(); &amp;nbsp;&amp;nbsp;&amp;nbsp; var symbol = new esri.symbol.SimpleMarkerSymbol(esri.symbol.SimpleMarkerSymbol.STYLE_CIRCLE, 10, new esri.symbol.SimpleLineSymbol(esri.symbol.SimpleLineSymbol.STYLE_SOLID, new dojo.Color([255, 0, 0]), 1), new dojo.Color([0, 255, 0, 0.25])); &amp;nbsp;&amp;nbsp;&amp;nbsp; var graphic = new esri.Graphic(geometry,symbol); &amp;nbsp;&amp;nbsp;&amp;nbsp; map.graphics.add(graphic); }&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;outside the executeIdentifyTask function.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Just before the dojo.connect(map, 'onLoad', createToolbar) inside init() is good.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;2)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;uncomment the&amp;nbsp; dojo.connect(map, 'onLoad', createToolbar);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The problem is that the function createToolbar is not called by your code because it is written inside the executeIdentifyTask that is called only when you click on the map. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Davide&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Oct 2012 08:28:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/problems-with-draw-toolbar/m-p/180165#M16689</guid>
      <dc:creator>DavideLimosani</dc:creator>
      <dc:date>2012-10-16T08:28:36Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with Draw Toolbar</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/problems-with-draw-toolbar/m-p/180166#M16690</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks. But unfortunately that's not solving my problem. I still get a "toolbar is undefined" error. Any other thoughts?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Oct 2012 19:58:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/problems-with-draw-toolbar/m-p/180166#M16690</guid>
      <dc:creator>JessicaKnight1</dc:creator>
      <dc:date>2012-10-17T19:58:54Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with Draw Toolbar</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/problems-with-draw-toolbar/m-p/180167#M16691</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Bumping this up. I need a hand!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Oct 2012 15:04:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/problems-with-draw-toolbar/m-p/180167#M16691</guid>
      <dc:creator>JessicaKnight1</dc:creator>
      <dc:date>2012-10-19T15:04:14Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with Draw Toolbar</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/problems-with-draw-toolbar/m-p/180168#M16692</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Jessica you were close but the line that called the function that initialized the draw toolbar was commented out. There were also a few formatting issues that may have been contributing to the problem. I modified your code to call the draw toolbar right after you create the nav toolbar. See a working version of your code here: &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://jsfiddle.net/KqmwX/"&gt;http://jsfiddle.net/KqmwX/&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Oct 2012 15:22:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/problems-with-draw-toolbar/m-p/180168#M16692</guid>
      <dc:creator>KellyHutchins</dc:creator>
      <dc:date>2012-10-19T15:22:00Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with Draw Toolbar</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/problems-with-draw-toolbar/m-p/180169#M16693</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks so much! Hopefully I can get my GP task up and running soon now...trying to teach this to myself has been a challenge for sure!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Oct 2012 16:35:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/problems-with-draw-toolbar/m-p/180169#M16693</guid>
      <dc:creator>JessicaKnight1</dc:creator>
      <dc:date>2012-10-19T16:35:41Z</dc:date>
    </item>
  </channel>
</rss>

