Google map marker click, display a modal

孤街醉人 提交于 2019-12-13 02:56:59

问题


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


回答1:


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');
});

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

Hope that helps!



来源:https://stackoverflow.com/questions/24439909/google-map-marker-click-display-a-modal

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!