forked from organicmaps/organicmaps
[search] Get hotel's search mark using SetFromType
Signed-off-by: David Martinez <47610359+dvdmrtnz@users.noreply.github.com>
This commit is contained in:
parent
a3ee99035d
commit
3f81ad6f30
3 changed files with 10 additions and 12 deletions
|
@ -1418,11 +1418,7 @@ void Framework::FillSearchResultsMarks(SearchResultsIterT beg, SearchResultsIter
|
|||
{
|
||||
auto const fID = r.GetFeatureID();
|
||||
mark->SetFoundFeature(fID);
|
||||
|
||||
if (r.m_details.m_isHotel)
|
||||
mark->SetHotelType();
|
||||
else
|
||||
mark->SetFromType(r.GetFeatureType());
|
||||
mark->SetFromType(r.GetFeatureType());
|
||||
mark->SetVisited(m_searchMarks.IsVisited(fID));
|
||||
mark->SetSelected(m_searchMarks.IsSelected(fID));
|
||||
}
|
||||
|
|
|
@ -167,7 +167,15 @@ private:
|
|||
{{"shop", "toys"}, SearchMarkType::ShopToys},
|
||||
{{"tourism", "theme_park"}, SearchMarkType::ThemePark},
|
||||
{{"leisure", "water_park"}, SearchMarkType::WaterPark},
|
||||
{{"tourism", "zoo"}, SearchMarkType::Zoo}
|
||||
{{"tourism", "zoo"}, SearchMarkType::Zoo},
|
||||
{{"tourism", "hotel"}, SearchMarkType::Hotel},
|
||||
{{"tourism", "apartment"}, SearchMarkType::Hotel},
|
||||
{{"tourism", "camp_site"}, SearchMarkType::Hotel},
|
||||
{{"tourism", "chalet"}, SearchMarkType::Hotel},
|
||||
{{"tourism", "guest_house"}, SearchMarkType::Hotel},
|
||||
{{"tourism", "hostel"}, SearchMarkType::Hotel},
|
||||
{{"tourism", "motel"}, SearchMarkType::Hotel},
|
||||
{{"tourism", "resort"}, SearchMarkType::Hotel}
|
||||
};
|
||||
|
||||
m_searchMarkTypes.reserve(table.size());
|
||||
|
@ -271,11 +279,6 @@ void SearchMarkPoint::SetFromType(uint32_t type)
|
|||
SetAttributeValue(m_type, GetSearchMarkType(type));
|
||||
}
|
||||
|
||||
void SearchMarkPoint::SetHotelType()
|
||||
{
|
||||
SetAttributeValue(m_type, SearchMarkType::Hotel);
|
||||
}
|
||||
|
||||
void SearchMarkPoint::SetNotFoundType()
|
||||
{
|
||||
SetAttributeValue(m_type, SearchMarkType::NotFound);
|
||||
|
|
|
@ -48,7 +48,6 @@ public:
|
|||
void SetMatchedName(std::string const & name);
|
||||
|
||||
void SetFromType(uint32_t type);
|
||||
void SetHotelType();
|
||||
void SetNotFoundType();
|
||||
|
||||
void SetPreparing(bool isPreparing);
|
||||
|
|
Loading…
Add table
Reference in a new issue