Show images in popups

This commit is contained in:
Edward Betts 2021-05-08 10:39:06 +02:00
parent c4aa27e8f4
commit e3cefcfcbd
4 changed files with 230 additions and 1 deletions

View file

@ -297,6 +297,9 @@ function load_wikidata_items() {
popup += `<br><a href="${isa_url}">${isa_label}</a> (${isa_qid})`;
}
}
if (item.image_list && item.image_list.length) {
popup += `<br><img src="/commons/${item.image_list[0]}">`;
}
popup += '</p>';
marker.bindPopup(popup);
marker.addTo(group);