AnsweredAssumed Answered

Maps Toolbar Draw : Dojo compatiblity issue

Question asked by rajasekar80 on May 13, 2013
Latest reply on May 14, 2013 by rajasekar80
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:15
dojo.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/

Attachments

Outcomes