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

标签 javascript jquery google-maps gmaps.js

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

相关文章:

javascript - 在排序 html 元素时使用 jQuery appendTo()

android - 在 map fragment 上添加按钮以在 map 上执行操作

twitter-bootstrap - 如何使用 Bootstrap 网格系统覆盖 map

javascript - 如何使用 jquery 管理隐藏和显示多个 div 和部分

javascript - 仅使用数据量选择元素

javascript - js中如何将数字转换为十六进制字符串

javascript - 如何在 React/MUI 导航栏中制作单独的菜单/菜单项?

javascript - 切换页面无需重新加载

jQuery 焦点有时最终会使闪烁的文本光标消失

ios - react-native-maps:必须将 AirGoogleMaps 目录添加到您的 xCode 项目以支持 iOS 上的 GoogleMaps