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
It should be sufficient to have a global infowindow and then to change the position and content of that infowindow.
var infowindow = new google.maps.InfoWindow();
// Call this function to open an infowindow i.e. on click.
function respondToClick(latlng) {
infowindow.setOptions({
position: latlng,
content" "Hello, world"
});
}
As the same infowindow is used each time, you are guarantee'd to only ever have one open, and it uses less resources / memory than creating and then destroying multiple infowindows.