I can\'t get my markers to display different infowindows. The markers always display the content of the last \"contentString\".
I\'ve read a few other posts but none
One way you can get seriously dynamic info into an infoWindow, assuming you have php or such like is to set content of infoWindow as an iframe with src that takes info from the position or ID of the marker in question. So in initialize function or wherever.
var pos_info = new google.maps.InfoWindow({pixelOffset: new google.maps.Size(0, -5), maxWidth: 350, position: posit, ID: "pos_i"});
var pos_mark = new google.maps.Marker({map: map, position: posit, clickable: true, draggable: true, ID: "pos_m", icon: therm2});
pos_mark.addListener('mouseup', function () {
var lat = pos_mark.getPosition().lat();
lat = lat.toFixed(4)
var lng = pos_mark.getPosition().lng();
lng = lng.toFixed(4)
var contentString = ""
pos_info.setContent(contentString);
pos_info.open(map, pos_mark);
})