Bonjour à tous,

J'essaie de réaliser une carte avec Google Map v3 avec une liste de lien reliée à la carte.
J'obtiens ma carte avec les marqueurs et quand je clique sur un marqueur, le contenu s'affiche.
Problème : lorsque que je clique sur un lien, il est impossible d'ouvrir le marqueur correspondant.

Code html : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
   <title> Google Maps Example</title>
    <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>
    <script type="text/javascript">
    //<![CDATA[
 
        /* Déclaration des variables globales */
                var contenuListe = "";
                var tableaumarkers = [];
                var html="";
                var infoWindow = new google.maps.InfoWindow;
/* Déclaration de la variable "urlXml" avec le chemin et le nom du fichier XML avec les coordonnées des sites   */
                var urlXml = "phpsqlajax_expectedoutput.xml";
 
/* Fonction initialize() */
    var customIcons = {
      restaurant: {
        icon: 'http://localhost/image/mm_20_green.png',
                shadow: 'http://localhost/image/mm_20_shadow.png'
      },
      bar: {
        icon: 'http://localhost/image/mm_20_red.png',
                shadow: 'http://localhost/image/mm_20_shadow.png'
      }
    };
 
    function load() {
      var map = new google.maps.Map(document.getElementById("map"), {
        center: new google.maps.LatLng(47.6145, -122.3418),
        zoom: 13,
        mapTypeId: 'roadmap'
      });
  
 
      downloadUrl(urlXml, function(data) {
        var xml = parseXml(data);
                alert('xml '+xml);
        markers = xml.documentElement.getElementsByTagName("marker");
                contenuListe += '<ol>';
        for (var i = 0; i < markers.length; i++) {
          var name = markers[i].getAttribute("name");
          var address = markers[i].getAttribute("address");
          var type = markers[i].getAttribute("type");
          var point = new google.maps.LatLng(
              parseFloat(markers[i].getAttribute("lat")),
              parseFloat(markers[i].getAttribute("lng")));
         html = "" + name + "" + address;
          var icon = customIcons[type] || {};
          var marker= new google.maps.Marker({
            map: map,
            position: point,
            icon: icon.icon,
            shadow: icon.shadow
         });
                 
                 tableaumarkers[i]=marker;
         bindInfoWindow(marker, map, infoWindow, html);
                 contenuListe += '<li><a href="javascript:bindInfoWindow(markers,map,infoWindow,html)">' + name +'-'+ type + '</a></li>';
        }
                contenuListe += '</ol>';
                document.getElementById("EmplacementDeLaListe").innerHTML = contenuListe;
      });
    }
        
 
        function bindInfoWindow(markers, map, infoWindow, html) {
      google.maps.event.addListener(markers, 'click', function() {
        infoWindow.setContent(html);
        infoWindow.open(map, markers);
      });
    }
    function downloadUrl(url, callback) {
      var request = window.ActiveXObject ?
          new ActiveXObject('Microsoft.XMLHTTP') :
          new XMLHttpRequest;
 
      request.onreadystatechange = function() {
        if (request.readyState == 4) {
          request.onreadystatechange = doNothing;
          callback(request.responseText, request.status);
        }
      };
 
      request.open('GET', url, true);
      request.send(null);
    }
 
    function parseXml(str) {
      if (window.ActiveXObject) {
        var doc = new ActiveXObject('Microsoft.XMLDOM');
        doc.loadXML(str);
        return doc;
      } else if (window.DOMParser) {
        return (new DOMParser).parseFromString(str, 'text/xml');
      }
    }
 
    function doNothing() {}
    //]]>
 
  </script>
 
  </head>
 
  <body onload="load()">
  <div class="EncadrementDeMaCarte">
<div id="Container" style="position:relative; width:100%; height:400px">
    <div id="map" style="float: left; width: 60%;height: 650px; border: none"></div>
	<div id="EmplacementDeLaListe" style="overflow: auto; float: right; position: relative; width: 40%; height: 650px; border: none; background-color: #fff"></div>
</div>
  </body>
 
</html>

Je pense que le problème se situe au niveau du bindinfowindow mais impossible de le résoudre.

Merci de votre aide.