bindInfoWindow(markers, map, infoWindow, html);
markers is an array. bindInfowindow
expects a single marker. And infoWindow.setContent expects a string, not a google.maps.Marker object. Fixed function:
function bindInfoWindow(marker, map, infoWindow, html) {
google.maps.event.addListener(marker, 'click', function() {
infoWindow.setContent(html);
infoWindow.open(map, marker);
});
}
change this:
bindInfoWindow(markers, map, infoWindow, html);
to:
bindInfoWindow(marker, map, infoWindow, html);