Hi,try this:1) putfunction createToolbar(themap){ toolbar = new esri.toolbars.Draw(map); dojo.connect(toolbar,"onDrawEnd", addToMap); } function addToMap(geometry){ toolbar.deactivate(); 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])); var graphic = new esri.Graphic(geometry,symbol); map.graphics.add(graphic); }
outside the executeIdentifyTask function.Just before the dojo.connect(map, 'onLoad', createToolbar) inside init() is good.2)uncomment the dojo.connect(map, 'onLoad', createToolbar);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. Regards,Davide