function initMark() {
Listmes.markers.forEach((ele,i)=> {
var v = ele.mapMarker;
var content = [];
// content.push(
// `公司地址:${ele.markerContent}`
// );
if(ele.markerContent){
content.push(
`<span title="${ele.markerContent}" show-overflow-tooltip="true" style="overflow:hidden;text-overflow: ellipsis;display: -webkit-box;-webkit-line-clamp: 2;-webkit-box-orient: vertical;">公司地址:${ele.markerContent}</span>`
);
}
if(ele.companyInfo){
content.push(
`<span title="${ele.companyInfo}" show-overflow-tooltip="true" style="overflow:hidden;text-overflow: ellipsis;display: -webkit-box;-webkit-line-clamp: 2;-webkit-box-orient: vertical;">简介:${ele.companyInfo}</span>`
);
}
if(ele.companyTel){
content.push(
`电话:${ele.companyTel}`
);
}
content.push(
"</br><div></div>"
);
// content.push(
// "<div style='display: flex;justify-content: flex-end;'><img src='icon.png' style='width:30px;hight:30px;float:right' /><span style='margin-right:2px;'>查看VR实景</span></div>"
// );
var infoWindow = new AMap.InfoWindow({
isCustom: true, //使用自定义窗体
content: createInfoWindow(
ele.markerName,
content.join("<br/>")
),
offset: new AMap.Pixel(16, -45)
});
addMarker(v.split(",")[0], v.split(",")[1], infoWindow);
// console.log('vi',v)
});
// })
}