📜  谷歌地图加载 kml 文件 javascript 代码示例

📅  最后修改于: 2022-03-11 15:02:57.408000             🧑  作者: Mango

代码示例1
var kmlLayer = new google.maps.KmlLayer(src, {
  suppressInfoWindows: true,
  preserveViewport: false,
  map: map
});
kmlLayer.addListener('click', function(event) {
  var content = event.featureData.infoWindowHtml;
  var testimonial = document.getElementById('capture');
  testimonial.innerHTML = content;
});