From c4192887444df3d490f03a3292276e095fcea8b6 Mon Sep 17 00:00:00 2001 From: Alexander Borsuk Date: Sat, 16 Apr 2022 08:48:45 +0200 Subject: [PATCH] Get phone from "mobile" OSM tag Signed-off-by: Alexander Borsuk --- data/editor.config | 1 + editor/xml_feature.cpp | 2 +- indexer/feature_meta.cpp | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/data/editor.config b/data/editor.config index daafe22cf7..e0cd8a9f6d 100644 --- a/data/editor.config +++ b/data/editor.config @@ -41,6 +41,7 @@ + diff --git a/editor/xml_feature.cpp b/editor/xml_feature.cpp index 7b727762e5..8c59732029 100644 --- a/editor/xml_feature.cpp +++ b/editor/xml_feature.cpp @@ -170,7 +170,7 @@ void XMLFeature::ApplyPatch(XMLFeature const & featureWithChanges) { // TODO(mgsergio): Get these alt tags from the config. base::StringIL const alternativeTags[] = { - {"phone", "contact:phone", "contact:mobile"}, + {"phone", "contact:phone", "contact:mobile", "mobile"}, {"website", "contact:website", "url"}, {"fax", "contact:fax"}, {"email", "contact:email"} diff --git a/indexer/feature_meta.cpp b/indexer/feature_meta.cpp index eb8b14b505..8b7c4709d7 100644 --- a/indexer/feature_meta.cpp +++ b/indexer/feature_meta.cpp @@ -46,7 +46,7 @@ bool Metadata::TypeFromString(string const & k, Metadata::EType & outType) { if (k == "opening_hours") outType = Metadata::FMD_OPEN_HOURS; - else if (k == "phone" || k == "contact:phone" || k == "contact:mobile") + else if (k == "phone" || k == "contact:phone" || k == "contact:mobile" || k == "mobile") outType = Metadata::FMD_PHONE_NUMBER; else if (k == "fax" || k == "contact:fax") outType = Metadata::EType::FMD_FAX_NUMBER;