<?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: Maps Toolbar Draw : Dojo compatiblity issue in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/maps-toolbar-draw-dojo-compatiblity-issue/m-p/428209#M39379</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The issue resolved. Somehow the "this" object getting null in the following statement. &lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;dojo.connect(toolbar, "onDrawEnd", this.addToMap);

addToMap : function(geometry) {
}
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So I have used the addToMap functionality inside the dojo.connect like the following,&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;dojo.connect(toolbar, "onDrawEnd", function(geometry) {

});&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It works fine. Special thanks to Rambalaji to found this.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 12 Dec 2021 16:27:57 GMT</pubDate>
    <dc:creator>RajasekarNammalvar</dc:creator>
    <dc:date>2021-12-12T16:27:57Z</dc:date>
    <item>
      <title>Maps Toolbar Draw : Dojo compatiblity issue</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/maps-toolbar-draw-dojo-compatiblity-issue/m-p/428208#M39378</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am getting the following exception while trying to draw the features(Ploygon, Line, Circle) on the map. The issue has raised exactly "onDrawEnd" event. I am using ESRI-3.2 version.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Uncaught TypeError: Object [object Object] has no method 'apply' dojo.js:15&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;_549.(anonymous function)._54edojo.js:15&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;dojo.declare._onDblClickHandlerjsapi.js:19&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;(anonymous function)dojo.js:15&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;_549.(anonymous function)._54edojo.js:15&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;_599._firejsapi.js:19&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;_599._onDblClickHandlerjsapi.js:19&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;(anonymous function)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;[ATTACH=CONFIG]24241[/ATTACH]&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This is my code,&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
init : function() {
connect.connect(dojo.byId("btnCreatePolygonFeature"), 'onclick', dojo.hitch(this, this.activateDrawingTool, this.drawingToolFeature.polygon));
},

activateDrawingTool: function(tool){
[INDENT]switch (tool) {
[INDENT]case this.drawingToolFeature.polygon:
toolbar.activate(esri.toolbars.Draw.POLYGON);
break;
case this.drawingToolFeature.circle:
toolbar.activate(esri.toolbars.Draw.CIRCLE);
break;[/INDENT]
}&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [/INDENT]
map.hideZoomSlider();
},

initialiseView : function() {
dojo.connect(map, 'onLoad', function() {});

connect.connect(map, 'onLoad', function() {
toolbar = new esri.toolbars.Draw(map);
dojo.connect(toolbar,"onDrawEnd",this.addToMap);
});
},
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This is my ESRI reference link,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;SPAN&gt;view-source:&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://developers.arcgis.com/en/javascript/samples/toolbar_draw/" rel="nofollow noopener noreferrer" target="_blank"&gt;http://developers.arcgis.com/en/javascript/samples/toolbar_draw/&lt;/A&gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 16:27:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/maps-toolbar-draw-dojo-compatiblity-issue/m-p/428208#M39378</guid>
      <dc:creator>RajasekarNammalvar</dc:creator>
      <dc:date>2021-12-12T16:27:55Z</dc:date>
    </item>
    <item>
      <title>Re: Maps Toolbar Draw : Dojo compatiblity issue</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/maps-toolbar-draw-dojo-compatiblity-issue/m-p/428209#M39379</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The issue resolved. Somehow the "this" object getting null in the following statement. &lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;dojo.connect(toolbar, "onDrawEnd", this.addToMap);

addToMap : function(geometry) {
}
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So I have used the addToMap functionality inside the dojo.connect like the following,&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;dojo.connect(toolbar, "onDrawEnd", function(geometry) {

});&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It works fine. Special thanks to Rambalaji to found this.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 16:27:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/maps-toolbar-draw-dojo-compatiblity-issue/m-p/428209#M39379</guid>
      <dc:creator>RajasekarNammalvar</dc:creator>
      <dc:date>2021-12-12T16:27:57Z</dc:date>
    </item>
  </channel>
</rss>

