From GamingWiki
Line 40: | Line 40: | ||
function addMarker(latlng, title, description) { | function addMarker(latlng, title, description) { | ||
var marker = new google.maps.Marker({position:latlng, map: map, title:title}); | var marker = new google.maps.Marker({position:latlng, map: map, title:title}); | ||
− | infowindow = new google.maps.InfoWindow({ | + | infowindow = new google.maps.InfoWindow({content: description}); |
− | |||
− | |||
google.maps.event.addListener(marker, "click", function() { infowindow.open(map,marker); }); | google.maps.event.addListener(marker, "click", function() { infowindow.open(map,marker); }); | ||
} | } |