blob: 3993e0b02699c05ec833e9f3a33791b00da2797d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
#include "map/taxi_delegate.hpp"
#include "search/city_finder.hpp"
#include "storage/country_info_getter.hpp"
#include "storage/storage.hpp"
#include "coding/string_utf8_multilang.hpp"
TaxiDelegate::TaxiDelegate(storage::Storage const & st, storage::CountryInfoGetter const & ig,
search::CityFinder & cf)
: m_storage(st), m_infoGetter(ig), m_cityFinder(cf)
{
}
storage::CountriesVec TaxiDelegate::GetCountryIds(m2::PointD const & point)
{
auto const countryId = m_infoGetter.GetRegionCountryId(point);
storage::CountriesVec topmostCountryIds;
m_storage.GetTopmostNodesFor(countryId, topmostCountryIds);
return topmostCountryIds;
}
std::string TaxiDelegate::GetCityName(m2::PointD const & point)
{
return m_cityFinder.GetCityName(point, StringUtf8Multilang::kEnglishCode);
}
storage::CountryId TaxiDelegate::GetMwmId(m2::PointD const & point)
{
return m_infoGetter.GetRegionCountryId(point);
}
|