Remove OSM category 'other'
This commit is contained in:
parent
01710760d2
commit
23782313b5
@ -856,7 +856,6 @@
|
||||
<string name="poi_category_cafe">Cafe</string>
|
||||
<string name="poi_category_hotel">Hotel</string>
|
||||
<string name="poi_category_supermarket">Supermarket</string>
|
||||
<string name="poi_category_other">Place of interest</string>
|
||||
<string name="poi_category_school">School</string>
|
||||
<string name="poi_category_parking">Parking</string>
|
||||
<string name="poi_category_fuel">Gas station</string>
|
||||
|
||||
@ -159,7 +159,7 @@ private fun <A, B> Map<String, String>.matchAnyTag(
|
||||
?.firstNotNullOfOrNull { scope[it] }
|
||||
}
|
||||
|
||||
private fun Map<String, String>.categorize(context: Context): Pair<String, LocationIcon?> {
|
||||
private fun Map<String, String>.categorize(context: Context): Pair<String?, LocationIcon?> {
|
||||
val category = this.firstNotNullOfOrNull { (tag, value) ->
|
||||
val values = value.split(' ', ',', '.', ';').map { it.trim() }.toSet()
|
||||
when (tag.lowercase()) {
|
||||
@ -305,7 +305,7 @@ private fun Map<String, String>.categorize(context: Context): Pair<String, Locat
|
||||
else -> null
|
||||
}
|
||||
}
|
||||
val (rid, icon) = category ?: (R.string.poi_category_other to null)
|
||||
val (rid, icon) = category ?: return null to null
|
||||
return context.resources.getString(rid) to icon
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user