Abstracted code for adding markets to map, so that every time that it happens, we loop through and re-assign popups as well.

Also included way to open a single popup afterwards, for geocoding use
case.