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({ | |
− | + | // content: "<div class=\"mapmarker\">\n" + description + "\n</div>" | |
+ | // }); | ||
+ | google.maps.event.addListener(marker, "click", function() { | ||
+ | infowindow.setcontent(description); | ||
+ | infowindow.open(map,marker); | ||
}); | }); | ||
− | |||
} | } | ||
/** | /** |