From GamingWiki
Line 29: | Line 29: | ||
} | } | ||
geocoder = new google.maps.Geocoder(); | geocoder = new google.maps.Geocoder(); | ||
+ | infowindow = new google.maps.InfoWindow(); | ||
map = new google.maps.Map(document.getElementById("map_canvas"), myOptions); | map = new google.maps.Map(document.getElementById("map_canvas"), myOptions); | ||
getMarkerList(); | getMarkerList(); | ||
Line 41: | Line 42: | ||
var marker = new google.maps.Marker({position:latlng, map: map, title:title}); | var marker = new google.maps.Marker({position:latlng, map: map, title:title}); | ||
google.maps.event.addListener(marker, "click", function() { | google.maps.event.addListener(marker, "click", function() { | ||
+ | infowindow.close(); | ||
infowindow = new google.maps.InfoWindow(); | infowindow = new google.maps.InfoWindow(); | ||
infowindow.setContent(document.getElementById(descId)); | infowindow.setContent(document.getElementById(descId)); |