I am using a bootstrap tooltip to show the title of a map marker on mouseover. I am using 'prop' to set the title.
The problem is that the tooltip title attribute remains set as the first marker you mouseover.
markers[id].addListener('mouseover', function () {
console.log(markers[id].title);
/* get marker pixel position */
var proj = overlay.getProjection();
var pos = markers[id].getPosition();
var p = proj.fromLatLngToContainerPixel(pos);
/* show tooltip */
$("#tooltip").css("left", p.x + "px").css("top", (p.y + 20) + "px").prop('title', markers[id].title).tooltip('show');
});
Please see fiddle - http://jsfiddle.net/n8x6r5kt/1/