我有一组点在Google地图上加载,点击标记会显示infoWindow。接下来,我想显示特定于每个点的链接,以便在单击链接时,显示该特定点的infoWindow。
这是我的代码:
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?
}