Click GEvent.addListener with jquery

Posted by Jason on Stack Overflow See other posts from Stack Overflow or by Jason
Published on 2010-05-07T18:15:33Z Indexed on 2010/05/07 18:18 UTC
Read the original article Hit count: 336

Created a google map with GMap2 and put pinpoints on there that open up a balloon with the address when the pinpoint is clicked.

I would like users to be able to click text on the page itself and use jquery to open up the corresponding balloon. However I can't figure out the ID to use to call a jquery click event. Basically I've got a store listing down the left side and when user clicks store name I want it to open up the corresponding balloon.

GEvent.addListener(marker_500, "click", function ()
{
map.openInfoWindowHtml(point, myHtml);
}

Any idea what element tied to this click event is?

Tried

$("#marker_500").click();

And that doesn't work. Also tried alerting $(this).attr('id'); inside the click function and that is undefined. thanks jason

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about google-maps