I'm looking for simple example to select features of an operationalLayer by dragging an extent box. I'm attempting to build a new widget with a button that will activate the drawtool and allow the user to drag a box to select features and deactivate when completed.
Javascript API 3x
Edit to add current code.
div on the widget's html:
<div class="jimu-btn finish-select" data-dojo-attach-event="click:activateAcknowledgeTool" id="btnActivateSelection">Activate</div>
activateAcknowledgeTool: function () {
if (!this.drawToolbar) {
this.setupDrawToolbar();
}
this.enableDrawToolbar();
},
setupDrawToolbar: function () {
this.createDrawToolbar();