I have the following code to display information for a specific bookmark:
var bindInfoWindow = function (marker, map, infowindow, htmlContent) {
google.maps.event.addListener(marker, 'click', function () {
infowindow.setContent(htmlContent);
infowindow.open(map, marker);
})
};
It works fine if I click.
Now, how do I display information for all bookmarks without having to click?
I tried to remove the click function (see below), but it only shows the last loaded marker.
var bindInfoWindow = function (marker, map, infowindow, htmlContent) {
infowindow.setContent(htmlContent);
infowindow.open(map, marker);
};
How do I resolve this?