axs89/adopt-a-sidewalk — comment on commit d5ad689f73b733aa3b313b17a18a06460e67c504
File:  line 0
By axs89:

There were 2 issues here. The first is a timing issue - the map is not being created until the jquery `document.ready` function - `$()` and the map bounds_changed event can't be tied to the widget until after the map is initialized. Also the map variable was being set as a local in main.js, and the widget bounds changed listener was expecting it to be attached to window - e.g. `window.map`.

So I moved it to the main.js file after the map is initialized and updated the map reference which works, but not sure if that's where you think it should live in your code. So feel free to move it but keep in mind the timing as well as using a valid map reference for the widget event.