kopia lustrzana https://github.com/JOSM/MapWithAI
Add a fuzzy match for categories
Signed-off-by: Taylor Smock <taylor.smock@kaart.com>pull/1/head
rodzic
de3141ff90
commit
6ebd79a1b1
|
@ -105,6 +105,14 @@ public class MapWithAIInfo extends TileSourceInfo implements Comparable<MapWithA
|
|||
return category;
|
||||
}
|
||||
}
|
||||
// Fuzzy match
|
||||
if (s != null && !s.trim().isEmpty()) {
|
||||
for (MapWithAICategory type : MapWithAICategory.values()) {
|
||||
if (s.contains(type.getCategoryString()) || type.getCategoryString().contains(s)) {
|
||||
return type;
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
Ładowanie…
Reference in New Issue