How do i get all info windows to close upon clikcing another pin or clicking the map in itself? I\'m using http://google-maps-utility-library-v3.googlecode.com/svn/trunk/in
In case anyone wants to do this in the context of gmaps3 jQuery wrapper...
var infoWindows = [];
var locations=[
{position:[123,456],content:'marker title 1
msg text
/div>'}
]
var map=$('#mapName').gmap3()
.marker(locations)
.infowindow(locations)
.then(function (infowindow) {
var map = this.get(0);
var marker = this.get(1);
marker.forEach(function(item,i){
item.addListener('click', function() {
closeAllInfoWindows();
infowindow[i].open(map, item);
infoWindows.push(infowindow[i]);
});
})
})
.fit();
function closeAllInfoWindows() {
for (var i=0;i