[search] Return POI type before building type to recognize POIs with address.

This commit is contained in:
tatiana-yan 2018-06-20 18:20:10 +03:00 committed by mpimenov
parent 36be8bd535
commit b4f30af73f

View file

@ -85,6 +85,10 @@ Model::Type Model::GetType(FeatureType const & feature) const
static auto const & localityChecker = IsLocalityChecker::Instance();
static auto const & poiChecker = IsPoiChecker::Instance();
// Check whether object is POI first to mark POIs with address tags as POI.
if (poiChecker(feature))
return TYPE_POI;
if (buildingChecker(feature))
return TYPE_BUILDING;
@ -106,9 +110,6 @@ Model::Type Model::GetType(FeatureType const & feature) const
}
}
if (poiChecker(feature))
return TYPE_POI;
return TYPE_UNCLASSIFIED;
}