As the title states, on a given event (for me this happens to be upon opening a new google.maps.InfoWindow I want to be able to close any other currently open info
I have decided to create an array of all dynamically created Infobox. When you click on any first travel the array and then you close all open only one in which you have clicked.
var allInfos = [];
function closeInfos() {
for (i = 0; i < allInfos.length; i++) {
allInfos[i].close();
}
}
Once created the infobox, dynamically are you adding it to the array each as follows:
allInfos.push(infowindow);