forked from organicmaps/organicmaps
[booking] Use actual values for rendering hotels
This commit is contained in:
parent
e56584a1a1
commit
a25e16e88e
2 changed files with 4 additions and 18 deletions
|
@ -32,10 +32,9 @@ df::BaseApplyFeature::HotelData ExtractHotelData(FeatureType const & f)
|
|||
if (ftypes::IsBookingChecker::Instance()(f))
|
||||
{
|
||||
result.m_isHotel = true;
|
||||
// TODO: fill from metadata
|
||||
result.m_rating = "7.8";
|
||||
result.m_stars = 3;
|
||||
result.m_priceCategory = 2;
|
||||
result.m_rating = f.GetMetadata().Get(feature::Metadata::FMD_RATING);
|
||||
strings::to_int(f.GetMetadata().Get(feature::Metadata::FMD_STARS), result.m_stars);
|
||||
strings::to_int(f.GetMetadata().Get(feature::Metadata::FMD_PRICE_RATE), result.m_priceCategory);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
|
|
@ -332,20 +332,7 @@ IsLocalityChecker const & IsLocalityChecker::Instance()
|
|||
IsBookingChecker::IsBookingChecker()
|
||||
{
|
||||
Classificator const & c = classif();
|
||||
char const * arr[][3] = {
|
||||
{ "tourism", "alpine_hut", "booking" },
|
||||
{ "tourism", "apartment", "booking" },
|
||||
{ "tourism", "camp_site", "booking" },
|
||||
{ "tourism", "chalet", "booking" },
|
||||
{ "tourism", "guest_house", "booking" },
|
||||
{ "tourism", "hostel", "booking" },
|
||||
{ "tourism", "hotel", "booking" },
|
||||
{ "tourism", "motel", "booking" },
|
||||
{ "tourism", "resort", "booking" }
|
||||
};
|
||||
|
||||
for (size_t i = 0; i < ARRAY_SIZE(arr); ++i)
|
||||
m_types.push_back(c.GetTypeByPath(vector<string>(arr[i], arr[i] + 3)));
|
||||
m_types.push_back(c.GetTypeByPath({ "sponsored", "booking" }));
|
||||
}
|
||||
|
||||
IsBookingChecker const & IsBookingChecker::Instance()
|
||||
|
|
Loading…
Add table
Reference in a new issue