【发布时间】:2013-08-05 11:18:42
【问题描述】:
我正在尝试查找如何自动关闭或/和关闭标记的信息窗口(谷歌地图)。
我处理了那个代码,但我不明白为什么关闭函数没有关闭 de infowindow。我的 Firefox 控制台没有错误
这是代码,我们将不胜感激
//Infowindow
google.maps.event.addListener(markers[i], 'click', function() {
/* the marker's content gets attached to the info-window: */
var info = new google.maps.InfoWindow({
content: this.content
});
info.close(); // IT DOES NOT CLOSE the open infowindow or all open
/* trigger the infobox's open function */
info.open(map,this); //This works
/* keep the handle, in order to close it on next click event */
//infos[0]=info;
});
非常感谢
【问题讨论】:
-
那不只是因为你关了它就打开了???
-
不,很遗憾,没有一个能解决我的问题
标签: google-maps google-maps-api-3 google-maps-markers infowindow