diff options
author | Lev Dragunov <l.dragunov@corp.mail.ru> | 2015-08-06 21:16:43 +0300 |
---|---|---|
committer | Alex Zolotarev <alex@maps.me> | 2015-09-23 03:00:21 +0300 |
commit | 30b30063a6ca50d918e6a44e5435ed3243a7cf82 (patch) | |
tree | d00551fd3f454a5ed3332b496072f08e9ed346dd /map/framework.cpp | |
parent | f076cf02949282cdafdb348482cbf9c10f2fcd4b (diff) |
Pedestrian map existence check.
Diffstat (limited to 'map/framework.cpp')
-rw-r--r-- | map/framework.cpp | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/map/framework.cpp b/map/framework.cpp index d00a2a45e2..ef8296b018 100644 --- a/map/framework.cpp +++ b/map/framework.cpp @@ -2190,19 +2190,21 @@ void Framework::SetRouterImpl(RouterType type) { unique_ptr<IRouter> router; unique_ptr<OnlineAbsentCountriesFetcher> fetcher; + + auto countryFileGetter = [this](m2::PointD const & p) -> string + { + // TODO (@gorshenin): fix search engine to return CountryFile + // instances instead of plain strings. + return GetSearchEngine()->GetCountryFile(p); + }; + if (type == RouterType::Pedestrian) { - router = CreatePedestrianAStarBidirectionalRouter(m_model.GetIndex()); + router = CreatePedestrianAStarBidirectionalRouter(m_model.GetIndex(), countryFileGetter); m_routingSession.SetRoutingSettings(routing::GetPedestrianRoutingSettings()); } else { - auto countryFileGetter = [this](m2::PointD const & p) -> string - { - // TODO (@gorshenin): fix search engine to return CountryFile - // instances instead of plain strings. - return GetSearchEngine()->GetCountryFile(p); - }; auto localFileGetter = [this](string const & countryFile) -> shared_ptr<LocalCountryFile> { return m_storage.GetLatestLocalFile(CountryFile(countryFile)); |