Commit 9530056e authored by Volker Krause's avatar Volker Krause
Browse files

Add a few more category tags to the OSM info model

parent 89ba5e18
Pipeline #165286 failed with stages
in 1 minute and 8 seconds
......@@ -193,6 +193,7 @@ struct {
M("diaper", DiaperChangingTable, UnresolvedCategory),
M("email", Email, Contact),
M("fee", Fee, UnresolvedCategory),
M("historic", Category, Header),
M("leisure", Category, Header),
M("maxstay", MaxStay, Parking),
M("mx:realtime_available", AvailableVehicles, Main),
......@@ -480,6 +481,7 @@ QVariant OSMElementInformationModel::valueForKey(Info info) const
l += m_element.tagValue("vending").split(';');
l += m_element.tagValue("office").split(';');
l += m_element.tagValue("leisure").split(';');
l += m_element.tagValue("historic").split(';');
l += m_element.tagValue("mx:vehicle");
if (l.isEmpty()) {
l += m_element.tagValue("room").split(';');
......@@ -491,7 +493,7 @@ QVariant OSMElementInformationModel::valueForKey(Info info) const
for (auto it = l.begin(); it != l.end();++it) {
(*it) = (*it).trimmed();
if ((*it).isEmpty() || (*it) == "yes" || (*it) == "vending_machine") {
if ((*it).isEmpty() || (*it) == "yes" || (*it) == "no" || (*it) == "vending_machine" || (*it) == "building") {
continue;
}
out.push_back(translateValue((*it).constData(), amenity_map));
......
......@@ -21,6 +21,8 @@ namespace KOSMIndoorMap {
static constexpr const ValueMapEntry amenity_map[] = {
{ "alcohol", kli18nc("OSM::amenity/shop", "Alcohol") },
{ "apartment", kli18nc("OSM::amenity/shop", "Apartment") },
{ "arts_centre", kli18nc("OSM::amenity/shop", "Arts Center") },
{ "artwork", kli18nc("OSM::amenity/shop", "Artwork") },
{ "atm", kli18nc("OSM::amenity/shop", "ATM") },
{ "attraction", kli18nc("OSM::amenity/shop", "Attraction") },
{ "bag", kli18nc("OSM::amenity/shop", "Bag") },
......@@ -29,6 +31,7 @@ static constexpr const ValueMapEntry amenity_map[] = {
{ "bar", kli18nc("OSM::amenity/shop", "Bar") },
{ "beauty", kli18nc("OSM::amenity/shop", "Beauty") },
{ "bed", kli18nc("OSM::amenity/shop", "Bed") },
{ "bench", kli18nc("OSM::amenity", "Bench") },
{ "beverages", kli18nc("OSM::amenity/shop", "Beverages") },
{ "bicycle", kli18nc("OSM::amenity/shop", "Bicycle") },
{ "bicycle_parking", kli18nc("OSM::amenity/shop", "Bicycle Parking") },
......@@ -45,6 +48,7 @@ static constexpr const ValueMapEntry amenity_map[] = {
{ "chemist", kli18nc("OSM::amenity/shop", "Chemist") },
{ "chocolate", kli18nc("OSM::amenity/shop", "Chocolate") },
{ "cinema", kli18nc("OSM::amenity/shop", "Cinema") },
{ "citywalls", kli18nc("OSM::historic", "Citywall") },
{ "clothes", kli18nc("OSM::amenity/shop", "Clothes") },
{ "coffee", kli18nc("OSM::amenity/shop", "Coffee") },
{ "computer", kli18nc("OSM::amenity/shop", "Computer") },
......@@ -71,6 +75,7 @@ static constexpr const ValueMapEntry amenity_map[] = {
{ "garden", kli18nc("OSM::amenity/shop", "Garden") },
{ "garden_centre", kli18nc("OSM::amenity/shop", "Garden Center") },
{ "gift", kli18nc("OSM::amenity/shop", "Gift Shop") },
{ "government", kli18nc("OSM::office", "Government") },
{ "greengrocer", kli18nc("OSM::amenity/shop", "Greengrocer") },
{ "guest_house", kli18nc("OSM::amenity/shop", "Guest House") },
{ "hairdresser", kli18nc("OSM::amenity/shop", "Hairdresser") },
......@@ -93,9 +98,12 @@ static constexpr const ValueMapEntry amenity_map[] = {
{ "lost_property", kli18nc("OSM::amenity/shop", "Lost & Found") },
{ "luggage_locker", kli18nc("OSM::amenity/shop", "Locker") },
{ "mall", kli18nc("OSM::amenity/shop", "Mall") },
{ "marketplace", kli18nc("OSM::amenity", "Marketplace") },
{ "medical_supply", kli18nc("OSM::amenity/shop", "Medical Supply") },
{ "memorial", kli18nc("OSM::historic", "Memorial") },
{ "mobile_phone", kli18nc("OSM::amenity/shop", "Mobile Phone") },
{ "money_transfer", kli18nc("OSM::amenity/shop", "Money Transfer") },
{ "monument", kli18nc("OSM::historic", "Monument") },
{ "motorcycle_parking", kli18nc("OSM::amenity/shop", "Motorcycle Parking") },
{ "motorcycle_rental", kli18nc("OSM::amenity/shop", "Motorcycle Rental") },
{ "museum", kli18nc("OSM::amenity/shop", "Museum") },
......@@ -151,6 +159,7 @@ static constexpr const ValueMapEntry amenity_map[] = {
{ "waiting", kli18nc("OSM::amenity/shop", "Waiting Area") },
{ "waiting_area", kli18nc("OSM::amenity/shop", "Waiting Area") },
{ "waiting_room", kli18nc("OSM::amenity/shop", "Waiting Area") },
{ "waste_basket", kli18nc("OSM::amenity", "Waste Basket") },
{ "wine", kli18nc("OSM::amenity/shop", "Wine") },
};
static_assert(isSortedLookupTable(amenity_map), "amenity map is not sorted!");
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment