I have this code where I display and set all my markers. How can I add a popup with some information on markers with this code? I add \"i\" variable on text, but it sets on all
var marker = new google.maps.Marker({ position: myLatLng, .... content: point[4] }); google.maps.event.addListener(marker, 'click', function() { infowindow.setContent(this.content); infowindow.open(map, this); });
Code inside loop. This worked for me perfectly.