1 回答
TA贡献1802条经验 获得超10个赞
这做到了这一点:
photoParcEx.on('click', function (e) {
sidebar.show();
console.log(e.layer.feature.properties.Type);
var photoDesc = document.getElementById("photoDesc");
//$("sidebar").innerHTML = "Type : " + e.layer.properties.Type;
if (photoDesc.style.display === 'none') {
photoDesc.style.display = "block";
} else {
}
document.getElementById("type").innerHTML = "TYPE : " + (e.layer.feature.properties.Type).toUpperCase();
document.getElementById("desc").innerHTML = "<b>MY STORY : </b>" + e.layer.feature.properties.description;
document.getElementById("photo").src = e.layer.feature.properties.image1;
removeBanner();
});
添加回答
举报