1.在弹出层后面加入标签并循环,生成多个id,依次添加到overLay中
$('#popupDom').after("<div id = 'overlyPath" + index + "' class='pathOvbg'><span>" + (index + 1) + '</span>' + item.duration + '</div>');
//content.innerHTML = `<p class="pathOvbg">${item.duration}</p>`;
console.log(Math.floor(item.item.length / 2));
let pathOverlay = new Overlay({
element: document.getElementById('overlyPath' + index),
autoPan: true,
position: item.item[Math.floor(item.item.length / 2) + index].tmc[2],
});
this.map.addOverlay(pathOverlay);
pathOverlay.setPositioning('bottom-left');