Thanks for the helpful code. After I add the dependency 'dojo/_base/lang', the widget works very well! Very appreciated!
this.own(on(this.drawBox, 'DrawEnd', lang.hitch(this, this._onDrawComplete)));
is very powerful! It makes the connection between the Draw-box with my query.
I think lang.hitch is kindly like function/event. What does “own” means and why puts “own” inside postCreate?
I found some information below for “own” but do not fully understand.
--most of the things that you define inside .own() are getting correctly removed once the widget itself is destroyed. Using .own() prevents memory leaks in your app.