forked from edward/owl-map
Show item street address in popup
This commit is contained in:
parent
253c75f46c
commit
e67cb131a9
|
@ -283,6 +283,9 @@ function add_wikidata_marker(item, marker_data) {
|
||||||
if (item.image_list && item.image_list.length) {
|
if (item.image_list && item.image_list.length) {
|
||||||
popup += `<br><img src="/commons/${item.image_list[0]}">`;
|
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>";
|
popup += "</p>";
|
||||||
marker.bindPopup(popup);
|
marker.bindPopup(popup);
|
||||||
var group = add_to_feature_group(item.qid, marker);
|
var group = add_to_feature_group(item.qid, marker);
|
||||||
|
|
|
@ -152,6 +152,7 @@ def get_markers(all_items):
|
||||||
"description": item.description(),
|
"description": item.description(),
|
||||||
"markers": locations,
|
"markers": locations,
|
||||||
"image_list": image_filenames,
|
"image_list": image_filenames,
|
||||||
|
"street_address": item.get_claim("P6375"),
|
||||||
"isa_list": [v["id"] for v in item.get_claim("P31")],
|
"isa_list": [v["id"] for v in item.get_claim("P31")],
|
||||||
}
|
}
|
||||||
items.append(item)
|
items.append(item)
|
||||||
|
|
Loading…
Reference in a new issue