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.Uncaught TypeError: Object [object Object] has no method 'apply' dojo.js:15_549.(anonymous function)._54edojo.js:15dojo.declare._onDblClickHandlerjsapi.js:19(anonymous function)dojo.js:15_549.(anonymous function)._54edojo.js:15_599._firejsapi.js:19_599._onDblClickHandlerjsapi.js:19(anonymous function)[ATTACH=CONFIG]24241[/ATTACH]This is my code,
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]
} [/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);
});
},
This is my ESRI reference link,view-source:http://developers.arcgis.com/en/javascript/samples/toolbar_draw/