Google地图标记点击,显示一个模式 [英] Google map marker click, display a modal

查看:94
本文介绍了Google地图标记点击,显示一个模式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,我需要在点击标记时显示bootstrap模式,代码如下:
map a>

Hi i need show the bootstrap modal on clicking the marker, the code is here: map

推荐答案

我在这里分叉了您的代码: http://www.bootply.com/NoflZLtYtI

I´ve forked your code here: http://www.bootply.com/NoflZLtYtI

我添加了以下代码:

I´ve added the following code:

google.maps.event.addListener(marker_1, 'click', function() {
    $('#myModal').modal('show');
});

记录marker_1上的点击事件,并在回调中打开模态窗口!

Suscribe click event on "marker_1", and in the callback, open modal window!

希望有帮助!

这篇关于Google地图标记点击,显示一个模式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆