カスタムマーカーのセットをループスルーしてGoogleマップを実装する以下のjsがあります。マーカーごとに異なる情報ウィンドウが必要なので、マーカーをクリックすると関連するコンテンツが表示されます。現時点では、情報ウィンドウが開かず、コンソールにエラーが表示されません
infowindow = new google.maps.InfoWindow();
for(var i=0; i<google_map_item.length; i++)
{
latlon = new google.maps.LatLng(google_map_item[i].lat, google_map_item[i].lon)
bounds.extend(latlon);
var iconcolor = google_map_item[i].iconColor;
marker = new google.maps.Marker({
map: map,
position: latlon,
icon: "https://chart.googleapis.com/chart?chst=d_map_pin_letter_withshadow&chld=" + (i + 1) + "|"+iconcolor+"|000000",
type: 'flat',
icon_color: '#ff0000',
label_color: '#ffffff',
width: '20',
height: '20',
label_size: '11',
clickable: true
});
google.maps.event.addListener(marker, 'click', function() {
//marker.info.open(map, this);
infowindow.setContent(this.latlon);
infowindow.open(map, this);
});
map.fitBounds(bounds);
}