Fix "Local wikipedia results don't show in search history"

This commit is contained in:
nazar-kutz 2020-11-19 14:21:48 +02:00
parent 07353a0efc
commit 10c2478153

View file

@ -205,6 +205,20 @@ public class MapPoiTypes {
if (pt != null && !pt.isReference()) {
return pt;
}
if (pc.isWiki() && name.startsWith(WIKI_LANG)) {
return getPoiTypeForWiki(pc, name);
}
}
return null;
}
public AbstractPoiType getPoiTypeForWiki(PoiCategory osmwiki, String name) {
for (PoiType pt : osmwiki.getPoiTypes()) {
for (PoiType wikiLangPt : pt.getPoiAdditionals()) {
if (wikiLangPt != null && Algorithms.objectEquals(wikiLangPt.getOsmTag(), name)) {
return wikiLangPt;
}
}
}
return null;
}