如何从地图外部触发Google地图上标记的onclick事件?
我使用API的第3版.我已经看过很多版本2的教程,但是在版本3中找不到这个.
我有一个全局数组(命名标记),包含地图的所有标记(google.maps.Marker).现在我想做一些像:
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');
Run Code Online (Sandbox Code Playgroud)
感谢您的帮助,如果您需要更多信息,请告诉我们!