locator search

This commit is contained in:
NatureFreshMilk 2019-05-14 09:15:11 +02:00
parent fdd28c16f5
commit 2bb8319673
2 changed files with 16 additions and 1 deletions

View File

@ -46,6 +46,20 @@ var SearchResult = {
type = m("img", { src: "pics/bones_top.png" });
}
// locator
if (obj.type == "locator"){
description = m("span", obj.attributes.name);
var img = "pics/locator_beacon_level1.png"
if (obj.attributes.level == "2")
img = "pics/locator_beacon_level2.png";
else if (obj.attributes.level == "3")
img = "pics/locator_beacon_level3.png";
type = m("img", { src: img });
}
// poi marker
if (obj.type == "poi"){
description = m("span", obj.attributes.name);

View File

@ -34,7 +34,8 @@ var SearchService = {
searchFor("poi", "name", SearchStore.query),
searchFor("train", "station", SearchStore.query),
searchFor("travelnet", "station_name", SearchStore.query),
searchFor("bones", "owner", SearchStore.query)
searchFor("bones", "owner", SearchStore.query),
searchFor("locator", "name", SearchStore.query)
];
Promise.all(prom_list)