2014-11-16 128 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? 



} 

回答