Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLev Dragunov <l.dragunov@corp.mail.ru>2015-08-17 15:53:32 +0300
committerAlex Zolotarev <alex@maps.me>2015-09-23 03:01:42 +0300
commitcb8b201c393c0cd6453729e16c7b7f1176509053 (patch)
treec6ff07d16241bede8ff4125540c2cd0ec39fb94e /map/framework.cpp
parentdbe1feb585a88510a03cc140a5269b58fd9e7813 (diff)
[routing] Framework API route between two points support.
Diffstat (limited to 'map/framework.cpp')
-rw-r--r--map/framework.cpp12
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));