How do I trigger the onclick event of a marker on a Google Maps from outside the map?
I use version 3 of the API. I've seen many tutorials for version 2, but can't find this for version 3.
I have a global array (named markers) containing all the marker of the map (google.maps.Marker). Now I want do do something like:
markers[i].click(); //I know it's not working, but you get the idea...
//Next line seems to be the way in v2, but what's the equivalent in v3?
GEvent.trigger(markers[i], 'click');
Thanks for your help and if you need more info, let me know!
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…