Revert "Display alternative names for streets"

This reverts commit 51d9605cde.
This commit is contained in:
Victor Shcherb 2017-03-25 19:07:13 +01:00
parent 28938b67a0
commit 3703fa9b2c

View file

@ -41,7 +41,6 @@ import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.LinkedHashSet;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.Map.Entry;
@ -357,15 +356,6 @@ public class SearchCoreFactory {
if (!phrase.getNameStringMatcher().matches(stripBraces(sr.localeName))) {
sr.priorityDistance = 5;
}
String searchTextLower = phrase.getUnknownSearchWord().toLowerCase();
if (!Algorithms.isEmpty(searchTextLower) && !sr.localeName.toLowerCase().contains(searchTextLower)) {
for (String otherName : sr.otherNames) {
if (otherName.toLowerCase().contains(searchTextLower)) {
sr.localeName = sr.localeName + " (" + otherName + ")";
break;
}
}
}
sr.objectType = ObjectType.STREET;
sr.localeRelatedObjectName = ((Street)object).getCity().getName(phrase.getSettings().getLang(), phrase.getSettings().isTransliterate());
sr.relatedObject = ((Street)object).getCity();
@ -876,15 +866,6 @@ public class SearchCoreFactory {
&& !(nm.matches(res.localeName) || nm.matches(res.otherNames))) {
continue;
}
String searchTextLower = phrase.getUnknownSearchWord().toLowerCase();
if (!Algorithms.isEmpty(searchTextLower) && !res.localeName.toLowerCase().contains(searchTextLower)) {
for (String otherName : res.otherNames) {
if (otherName.toLowerCase().contains(searchTextLower)) {
res.localeName = res.localeName + " (" + otherName + ")";
break;
}
}
}
res.localeRelatedObjectName = c.getName(phrase.getSettings().getLang(), phrase.getSettings().isTransliterate());
res.object = object;
res.preferredZoom = 17;