0

I've a set of points which load on Google Maps and clicking the marker shows the infoWindow. Next, I wanted to show links specific to each point such that when the link is clicked, that specific point's infoWindow is show.

Here's my code:

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? 



}
u134211
  • 315
  • 1
  • 2
  • 8

1 Answers1

0

I'm not sure what you're looking for but I think this can help you:

JavaScript function in href vs. onclick

Community
  • 1
  • 1
Gaétan Séchaud
  • 219
  • 1
  • 3
  • 14