diff --git a/map/framework.cpp b/map/framework.cpp index eab2c3b488..4372fa6295 100644 --- a/map/framework.cpp +++ b/map/framework.cpp @@ -744,7 +744,12 @@ void Framework::FillInfoFromFeatureType(FeatureType const & ft, place_page::Info info.m_address = GetAddressInfoAtPoint(feature::GetCenter(ft)).FormatHouseAndStreet(); if (ftypes::IsBookingChecker::Instance()(ft)) + { info.m_isSponsoredHotel = true; + string const & baseUrl = info.GetMetadata().Get(feature::Metadata::FMD_WEBSITE); + info.m_sponsoredBookingUrl = GetBookingApi().GetBookingUrl(baseUrl); + info.m_sponsoredDescriptionUrl = GetBookingApi().GetDescriptionUrl(baseUrl); + } info.m_isEditable = featureStatus != osm::Editor::FeatureStatus::Obsolete && !info.IsSponsoredHotel(); diff --git a/map/place_page_info.cpp b/map/place_page_info.cpp index 1116e3539f..2b94a56923 100644 --- a/map/place_page_info.cpp +++ b/map/place_page_info.cpp @@ -101,6 +101,9 @@ BookmarkAndCategory Info::GetBookmarkAndCategory() const { return m_bac; } string Info::GetBookmarkCategoryName() const { return m_bookmarkCategoryName; } string const & Info::GetApiUrl() const { return m_apiUrl; } +string const & Info::GetSponsoredBookingUrl() const { return m_sponsoredBookingUrl; } +string const & Info::GetSponsoredDescriptionUrl() const {return m_sponsoredDescriptionUrl; } + string Info::GetRatingFormatted() const { if (!IsSponsoredHotel()) diff --git a/map/place_page_info.hpp b/map/place_page_info.hpp index b6eaf8fb1a..dda6988242 100644 --- a/map/place_page_info.hpp +++ b/map/place_page_info.hpp @@ -56,6 +56,9 @@ public: string GetBookmarkCategoryName() const; string const & GetApiUrl() const; + string const & GetSponsoredBookingUrl() const; + string const & GetSponsoredDescriptionUrl() const; + /// @returns formatted rating string for booking object, or empty if it isn't booking object string GetRatingFormatted() const; /// @returns string with |kPricingSymbol| signs or empty string if it isn't booking object @@ -77,6 +80,9 @@ public: string m_address; /// Feature is a sponsored hotel. bool m_isSponsoredHotel = false; + /// Sponsored feature urls. + string m_sponsoredBookingUrl; + string m_sponsoredDescriptionUrl; /// Which country this MapObject is in. /// For a country point it will be set to topmost node for country.