AnsweredAssumed Answered

Cannot start editing with button

Question asked by jskinner-esristaff Employee on Feb 21, 2013
Latest reply on Apr 30, 2013 by jjtrier
I am attempting to start and stop an edit session using two buttons within a web app.  The edit session begins, but I have to click the "Start Editing" button twice to have it start.  The edit session will stop when I click the "Stop Editing" button, but then I am unable to start another edit session.  Does anyone know why both of these issues may be occurring?  Below is the code:

var editorWidget;  function startEditing(){     map.addLayers(editLayers);     dojo.connect(map, "onLayersAddResult", initEditing); }  function stopEditing(){     editorWidget.destroy(); }  function initEditing(results) {         var featureLayerInfos =, function(result) {           return {             "featureLayer": result.layer           };         });         var settings = {           map: map,           layerInfos: featureLayerInfos         };         var params = {           settings: settings         };                  editorWidget = new esri.dijit.editing.Editor(params, 'editorDiv');                  var options = {snapKey:dojo.keys.copyKey};         map.enableSnapping(options);                  editorWidget.startup(); }