I\'m currently using the following code the place multiple markers on a Google Map using their API.
The problem I\'m having is with multiple infowindows not working
This works fine for me! Just add a new property to marker object, this property contains the infowindow object.
var mytext = 'Infowindow contents in HTML'
var myinfowindow = new google.maps.InfoWindow({
content: mytext
});
var marker = new google.maps.Marker({
position: mypos,
map: mymap,
icon: myicon,
title: mytitle,
infowindow: myinfowindow
});
google.maps.event.addListener(marker, 'click', function() {
this.infowindow.open(map, this);
});