Le contenu du marqueur (infoWindow) Google Maps

J'essaie d'ajouter de l'infoWindow à plusieurs marqueurs sur une Carte Google. Le plus proche que je viens d'obtenir une infoWindow pour afficher la dernière adresse vous pouvez le voir dans le tableau, sur tous les marqueurs. Le peu de code que j'ai collé ci-dessous ne fonctionne pas, j'obtiens un "Uncaught TypeError: Cannot read property '4' undefined". Je suis sûr que c'est un problème de portée, mais je vais en rond ici et pourrait faire avec un peu d'aide:

var hotels = [
            ['ibis Birmingham Airport', 52.452656, -1.730548, 4, 'Ambassador Road<br />Bickenhill<br />Solihull<br />Birmingham<br />B26 3AW','(+44)1217805800','(+44)1217805810','[email protected]','http://www.booknowaddress.com'],
            ['ETAP Birmingham Airport', 52.452527, -1.731644, 3, 'Ambassador Road<br />Bickenhill<br />Solihull<br />Birmingham<br />B26 3QL','(+44)1217805858','(+44)1217805860','[email protected]','http://www.booknowaddress.com'],
            ['ibis Birmingham City Centre', 52.475162, -1.897208, 2, 'Ladywell Walk<br />Birmingham<br />B5 4ST','(+44)1216226010','(+44)1216226020','[email protected]','http://www.booknowaddress.com']
        ];

        for (var i = 0; i < hotels.length; i++) {
            var marker = new google.maps.Marker({
                position: new google.maps.LatLng(hotels[i][1], hotels[i][2]),
                map: map,
                icon: image,
                title: hotels[i][0],
                zIndex: hotels[i][2]
            });

            var infoWindow = new google.maps.InfoWindow();

            google.maps.event.addListener(marker, 'click', function () {
                var markerContent = hotels[i][4];
                infoWindow.setContent(markerContent);
                infoWindow.open(map, this);
            });
        }

Merci d'avance.

InformationsquelleAutor DarrylGodden | 2011-05-03