What is the best way to load content into my infowindow using ajax? Right now I am getting a similar effect using iframes but I am not that that happy with it. I thought thi
for (var i = 0; i < markersClient.length; i++) {
var location = new google.maps.LatLng(lats[i], longs[i]);
var marker = new google.maps.Marker({
position: location,
map: map,
lid: markersClient[i].t
});
var infowindow = new google.maps.InfoWindow({
content: ""
});
//debugger;
marker.setTitle(" - ");
markers.push(marker);
google.maps.event.addListener(marker, 'click', function (target, elem) {
infowindow.open(map, marker);
$.ajax({
success:function () {
infowindow.setContent(contentString);
}
});
intitalize map , marker , infowindow(as no content) and on marker 's click handler make ajax request