Update SketchOnMapSample.java
Tidied up old logic from cancel button
@@ -180,7 +180,7 @@ public class SketchOnMapSample extends Application {
// remove the underlying graphic to live update. This clears the graphic.
// graphicsOverlay.getGraphics().remove(graphic);
- //graphicsOverlay.clearSelection();
+
});
@@ -193,43 +193,6 @@ public class SketchOnMapSample extends Application {
cancelButton.setDisable(true);
undoButton.setDisable(true);
-
-// if (!graphicsOverlay.getGraphics().isEmpty()) {
-//
-// graphicsOverlay.clearSelection();
-// graphicsOverlay.getGraphics().add(graphic);
-// sketchEditor.stop();
-// selectGraphic();
-// } else {
-// sketchEditor.stop();
-// cancelButton.setDisable(true);
-// }
-
-// graphicsOverlay.getGraphics().add(graphic);
-// graphicsOverlay.clearSelection();
-// sketchEditor.stop();
-// cancelButton.setDisable(true);
-// selectGraphic();
-//
-// undoButton.setDisable(true);
-// cancelButton.setDisable(true);
-// // selectGraphic();
-//
-// if (!graphicsOverlay.getGraphics().isEmpty()) {
-//
-// Graphic cancelledGraphic = graphicsOverlay.getGraphics().get(0);
-// graphicsOverlay.getGraphics().remove(cancelledGraphic);
-// graphicsOverlay.getGraphics().add(cancelledGraphic);
-//
-// //graphicsOverlay.getGraphics().add(graphic);
-// graphicsOverlay.clearSelection();
-// sketchEditor.stop();
-//
-// } else {
-// graphicsOverlay.clearSelection();
-// sketchEditor.stop();
-// }
-
});
// when an item is selected from the drop down box
