i have a google map with multiple markers and each has its own infowindow.
nothing happens when i click. fyi: i know it the listener fires because i did put a alert in
I have the same issue and it has got something to do with the loop, because when I use hard coded values like this they do work:
// Add infowindow
google.maps.event.addListener(markers[0], 'click', function() {
infowindows[0].open(map,markers[0]);
});
// Add infowindow
google.maps.event.addListener(markers[1], 'click', function() {
infowindows[1].open(map,markers[1]);
});