【发布时间】:2013-05-26 07:00:51
【问题描述】:
我有一个小问题
是否可以在 gmaps v3 中的标记中的链接中添加事件 CLICK?
var m = new google.maps.Marker({
map: map,
animation: google.maps.Animation.DROP,
position: position,
html: "<a id='link'>mylink</a>",
icon: '/images/repairer.png'
});
gmarkers.push(m);
$('#link').click(function () {
alert($(this).attr('data'));
});
google.maps.event.addListener(m, 'click', function () {
info_window.setContent(this.html);
info_window.open(map, this);
});
帮助
【问题讨论】:
标签: javascript jquery google-maps google-maps-markers infowindow