Within the Geocoder Widget.js file, _initGeocoder function, if I add the following line:
this.own(on(geocoder, "clear", lang.hitch(this, "clearResults")));
and then add the corresponding "clearResults" function, I am able to clear the map of any graphic selection and/or popup. However, I want to accomplish this task within another widget and not modify the original geocoder widget. Within my other widget, I know I need to use aspect but not quite sure if I should use .before or .after. I think .before makes more sense, but I'm not clear how to incorporate the line of code above into the _initGeocoder function and then call the clearResults function from within my widget. This seems like an easy task but I can't seem to get the syntax right. Any help/thoughts would be great!
Thanks
Douglas,
The way I would do it is use dojo query to get the widgets dom not and then use registry to get the dijit from the dom node.
Here is code that you can run from another widget to get to the geocoder:
Of course if you have your geocoder widget configured to use more than one geocode service then you will need to grab the next child.