AnsweredAssumed Answered

How to clear Geocoder results from a different widget

Question asked by guess on Feb 25, 2015
Latest reply on Feb 26, 2015 by rscheitlin

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

Outcomes