单击标记时如何获取谷歌地图标记ID?

时间:2016-08-06 08:17:44

标签: javascript

单击时如何获取制造商ID?

google.maps.event.addListener(marker, 'click', function() {
var locationTitle=marker;
infowindow.setContent(contentString);
infowindow.open(map, marker);});

1 个答案:

答案 0 :(得分:0)

试试这个

google.maps.event.addListener(marker, 'click', function() {               
  window.location = "www.cickstart.com/" + marker.id;
});