 <p>The best way to do this i think... is having an object with the infowindows that you have opened</p> <p>i have two objects, infos have all the infowindows created and markers contains all markers with they infowindows so i just execute this functions that loop the infowindow object and close all the infowindows</p> <pre><code>function CloseInfowindows() { for (var mkey in infos) { var mobj = markers[mkey]; mobj.infowindow.close(); } } </code></pre>