Bonjour à tous,
je rencontre un petit souci dans l'affichage d'infos bulle sur des marker googleMap.

Je souhaite avoir l'affichage d'une info bulle lors du click sur ce marker.
Or actuellement la bulle s'affiche sur le dernier marker qui a été déssiné, et non sur le marker clické.

Code : 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
 
 
stoTicketsClos.load({
					callback:function(records){
					for(var i=0; i<records.length; i++){
						var noAppel = records[i].data.noAppel;
						var x = records[i].data.x;
						x = x.replace(',','.');
						var y = records[i].data.y; 
						y = y.replace(',','.');
						CreateMarker(new google.maps.LatLng(x,y), 6);
 
						/*alert(i);
					 alert(noAppel);
						alert(x);
						alert(y); */
					}
					}
					}); 
		function CreateMarker(point, zoom){
		var markerOptions = {
			position:	point,
			clickable:	true,
			icon:		iconMarker0,
			title:		'Position test\351e'
		};
		marker = new google.maps.Marker(markerOptions);
		infoWindow = new google.maps.InfoWindow({content: '<div class="contentTab" style="margin-right:10px">coord=' + point + '</div>'});
 
 
		/* Click sur le marker */
		google.maps.event.addListener(marker, 'click', function(){
			/* Ouverture du popup */
			infoWindow.open(map, marker);
		});
 
		/* Ajout du marker sur la carte */
		marker.setMap(map);
	}