diff options
author | Lev Dragunov <l.dragunov@corp.mail.ru> | 2015-08-17 15:53:32 +0300 |
---|---|---|
committer | Alex Zolotarev <alex@maps.me> | 2015-09-23 03:01:42 +0300 |
commit | cb8b201c393c0cd6453729e16c7b7f1176509053 (patch) | |
tree | c6ff07d16241bede8ff4125540c2cd0ec39fb94e /map/framework.cpp | |
parent | dbe1feb585a88510a03cc140a5269b58fd9e7813 (diff) |
[routing] Framework API route between two points support.
Diffstat (limited to 'map/framework.cpp')
-rw-r--r-- | map/framework.cpp | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/map/framework.cpp b/map/framework.cpp index 0f84a3b88e..25685a7e26 100644 --- a/map/framework.cpp +++ b/map/framework.cpp @@ -2113,18 +2113,10 @@ void Framework::UpdateSavedDataVersion() Settings::Set("DataVersion", m_storage.GetCurrentDataVersion()); } -void Framework::BuildRoute(m2::PointD const & destination, uint32_t timeoutSec) +void Framework::BuildRoute(m2::PointD const & start, m2::PointD const & finish, uint32_t timeoutSec) { ASSERT_THREAD_CHECKER(m_threadChecker, ("BuildRoute")); - shared_ptr<State> const & state = GetLocationState(); - if (!state->IsModeHasPosition()) - { - CallRouteBuilded(IRouter::NoCurrentPosition, vector<storage::TIndex>(), - vector<storage::TIndex>()); - return; - } - if (IsRoutingActive()) CloseRouting(); @@ -2159,7 +2151,7 @@ void Framework::BuildRoute(m2::PointD const & destination, uint32_t timeoutSec) CallRouteBuilded(code, absentCountries, absentRoutingIndexes); }; - m_routingSession.BuildRoute(state->Position(), destination, + m_routingSession.BuildRoute(start, finish, [readyCallback](Route const & route, IRouter::ResultCode code) { GetPlatform().RunOnGuiThread(bind(readyCallback, route, code)); |