I\'ve followed this tutorial to create a custom Google Map. I\'ve included a few other elements such as linking it up to Wordpress and clustering the markers.
It\'s
i had a similar problem, i figure this out, to change the content in marker infowindow
var marker = new MarkerWithLabel({
id: "costume_ID",/*<---this is the start of the trick*/
position: new google.maps.LatLng(lat,lon),
icon: "../images/icon-bla.png",
map: map,
title: 'bla',
labelContent: 'bla,bla,
labelClass: "labels",
labelStyle: {opacity: 1.0}
})
google.maps.event.addListener(marker, 'click', (function() {
return function(){
infowindow.setContent(infor(this.id));/*<--- here is the trick*/
infowindow.open(map, this);
map.setCenter(this.getPosition());
}});
and than set the function that will output whatever you whant, if you have the info in variables.
function infor(im){
return "INFOWINDOW
Date: "+var[im].date+"
Sync: "+var[im].sync+"...bla,bla,bla";
}/*THIS FUNCTION RETURN THE STING TO SHOW ION THE INFOWINDOW*/