我使用 gmaps.js 来显示带有一些标记的简单 map ,但我想通过鼠标悬停显示信息窗口,但我找不到如何操作。 我的代码:
map = new GMaps({
scrollwheel: false,
div: '#gmap',
lat: -12,
lng: -77,
});
map.addMarker({
lat: -12,
lng: -77,
title: 'test',
infoWindow:{
content: '<p>HTML Content</p>'
},
mouseover: function(e){
this['infowindow'].open(map, this);
}
});
最佳答案
mouseover: function(e){
this.infoWindow.open(this.map, this);
}
关于javascript - gmaps.js 鼠标悬停打开信息窗口,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26365358/