我希望弹出窗口内的按钮对弹出窗口附加层进行一些操作。
L.marker(coors[i], { icon })
.addTo(this.drawnItem)
.bindPopup(this._getCustomIcon(mix))
.openPopup();
在我的 _getCustomIcon() 下面
_getCustomIcon = value => {
let delLayer = document.createElement("BUTTON");
delLayer.innerHTML = "Delete";
let CustomPopup = L.popup({ className: "customPopup" }).setContent(
`<p> ${value}</p> ${delLayer}` //here is error
);
return CustomPopup;
};