I am using an ArcGIS App which was created in ArcGIS Web App Builder 2.2. I am trying to connect to a map click event and/or a widget click event to run a custom made function. I have made simple apps and have been able to connect to click events in the past. With the apps created in Web App Builder the .js files are spread out all over the place and I am not that advanced in JavaScript to figure this out. I guess I am having trouble getting a handle on the map object which contains the lat, long, etc. of the click event. How would I find the map object to tie these events. Before I had just had all my .js code in one file and tied a click event like this simple example:
map = new Map("map",{
basemap:"Street",
center: center,
zoom: 3
});
map.on("click",mapClickEvent);
function mapClickEvent(evt){
console.log(evt);
}