谷歌地图v3鼠标悬停的标志信息窗口 [英] google maps v3 marker info window on mouseover
问题描述
我搜索了stackoverflow和其他论坛,包括谷歌地图v3 api docs的答案,但我找不到如何更改从点击触发标记信息窗口的事件到 mouseover 在我正在使用的文件中。
I have scoured stackoverflow and other forums including the google maps v3 api docs for an answer but I cannot find how to change the event that fires the marker info window from click to mouseover in the files I am working with.
我正在从包含融合表层的Google库中演示。
I am working with a demo from the google library that includes a fusion table layer.
您可以放大群集并查看位置的小红色圆圈标记。
您必须点击以显示信息窗口。我希望通过滚动显示信息窗口。
You zoom into the clusters and see the small red circle markers for locations. You have to click to reveal an info window. I wish to rollover to reveal the info window.
functions.js文件在这里完成大部分工作:
http://www.pretravelvideo.com/gmap2/functions.js
The functions.js file does most of the work here: http://www.pretravelvideo.com/gmap2/functions.js
推荐答案
下面是一个例子:
http://duncan99.wordpress.com/2011/10/08/google-maps-api-infowindows/
marker.addListener('mouseover', function() {
infowindow.open(map, this);
});
// assuming you also want to hide the infowindow when user mouses-out
marker.addListener('mouseout', function() {
infowindow.close();
});
这篇关于谷歌地图v3鼠标悬停的标志信息窗口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!