gpt4 book ai didi

javascript - gmaps.js 鼠标悬停打开信息窗口

转载 作者:塔克拉玛干 更新时间:2023-11-02 20:24:03 25 4
gpt4 key购买 nike

我使用 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/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com