I am trying to get the info windows of the markers that I have set to have dynamic content but the issue that I have been having is that info windows on won't open at all when clicked.
I believe I may be implementing the code infowindow in the wrong manner.
Code
var mosqueMarker, count;
for (count = 0; count < mosqueLocations.length; count++){
mosqueMarker = new google.maps.Marker({
position: new google.maps.LatLng(mosqueLocations[count][1], mosqueLocations[count][2]),
title: mosqueLocations[count][0],
map: map
})
}
var mosqueInfowindow = new google.maps.InfoWindow({})
mosqueMarker.addListener('click', function(count) {
mosqueInfowindow.setContent(mosqueLocations[count][0]),
console.log(mosqueLocations)
mosqueInfowindow.open(map, mosqueMarker)
})