Show item street address in popup

This commit is contained in:
Edward Betts 2021-05-11 10:04:32 +02:00
parent 253c75f46c
commit e67cb131a9
2 changed files with 4 additions and 0 deletions

View file

@ -283,6 +283,9 @@ function add_wikidata_marker(item, marker_data) {
if (item.image_list && item.image_list.length) {
popup += `<br><img src="/commons/${item.image_list[0]}">`;
}
if (item.street_address && item.street_address.length) {
popup += `<br>street address: ${item.street_address[0]["text"]}`;
}
popup += "</p>";
marker.bindPopup(popup);
var group = add_to_feature_group(item.qid, marker);

View file

@ -152,6 +152,7 @@ def get_markers(all_items):
"description": item.description(),
"markers": locations,
"image_list": image_filenames,
"street_address": item.get_claim("P6375"),
"isa_list": [v["id"] for v in item.get_claim("P31")],
}
items.append(item)