I am currently working on incorporating a polygon union functionality using ArcGIS 10.2 JavaScript 3.6 API with undo and redo capabilities. The union operation works fine, but I encounter an error when attempting to undo the operation:
An unhandled exception occurred at line 19, column 1879 in
Error message: 0x800a138f - JavaScript runtime error: Unable to get property 'length' of undefined or null reference
Here is the relevant code snippet:
dojo.connect(dijit.byId("Merge_Button"), "onClick", function () {
editing_function = "Merge_From";
document.getElementById("Status_Message").innerHTML = "Select Polygon to Merge From"
esri.bundle.toolbars.draw.addPoint = "Select Polygon to Merge From";
drawToolbar.activate(esri.toolbars.Draw.POINT);
});
// The rest of the code snippets follow...
Feel free to reference the above code snippet for context.