Fixed API and search routine.

This commit is contained in:
vng 2014-06-11 16:48:38 +03:00 committed by Alex Zolotarev
parent 78f805afab
commit be925032cf
3 changed files with 8 additions and 2 deletions

View file

@ -280,7 +280,7 @@ __weak SearchView * selfPointer;
params.m_query = [[self.searchBar.textField.text precomposedStringWithCompatibilityMapping] UTF8String];
params.m_callback = bind(&OnSearchResultCallback, _1);
params.SetInputLanguage([[UITextInputMode currentInputMode].primaryLanguage UTF8String]);
params.SetForceSearch(force);
params.SetForceSearch(force == YES);
return params;
}

View file

@ -1437,6 +1437,8 @@ bool Framework::ShowMapForURL(string const & url)
}
else if (StartsWith(url, "mapswithme://") || StartsWith(url, "mwm://"))
{
m_bmManager.UserMarksClear(UserMarkContainer::API_MARK);
if (m_ParsedMapApi.SetUriAndParse(url))
{
if (!m_ParsedMapApi.GetViewportRect(m_scales, rect))
@ -1458,7 +1460,11 @@ bool Framework::ShowMapForURL(string const & url)
if (result != NO_NEED_CLICK)
{
if (apiMark)
{
LOG(LINFO, ("Show API mark:", static_cast<ApiMarkPoint const *>(apiMark)->GetName()));
m_balloonManager.OnShowMark(apiMark);
}
else
{
PoiMarkPoint * mark = GetAddressMark(point);

View file

@ -176,7 +176,7 @@ bool Engine::Search(SearchParams const & params, m2::RectD const & viewport)
void Engine::GetResults(Results & res)
{
threads::MutexGuard guard(m_searchMutex);
m_searchResults.Swap(res);
res = m_searchResults;
}
void Engine::SetViewportAsync(m2::RectD const & viewport, m2::RectD const & nearby)