2014-11-16 161 views
0

我有一組點加載到谷歌地圖上,點擊標記顯示infoWindow。接下來,我想顯示特定於每個點的鏈接,以便在單擊鏈接時,該特定點的infoWindow是show。觸發谷歌地圖事件監聽器鏈接點擊

這裏是我的代碼:

var points = //array of points; 
for(var i = 0; i < points.length; i++) { 
    t=new google.maps.Marker({position:latlng}); 
    google.maps.event.addListener(point[i], 'click', function(event) { 
     //infobox.open(map, this); 
    } 
    show_e.push('<a href="#" id="'+point[i].id+'">'+point[i].name+'</a><br/>'); 

    //How to attach marker click event to the above link? 



} 

回答