[codereview] Fully filled point. Style fixes.

This commit is contained in:
Dmitry Kunin 2013-04-25 16:33:56 +03:00 committed by Alex Zolotarev
parent d055fcf19a
commit 722fc981aa
2 changed files with 11 additions and 9 deletions

View file

@ -728,20 +728,20 @@ namespace android
//TODO this is weird hack, we should reconsider Android
// lifecycle handling design
m_doLoadState = false;
url_api:: Request request;
bool success = m_work.SetViewportByURL(url, request);
// Show balloon
if (success && (request.m_points.size() > 0))
// Show temp balloon
if (success && !request.m_points.empty())
{
m2::PointD pt(MercatorBounds::LonToX(request.m_viewportLon),
MercatorBounds::LatToY(request.m_viewportLat));
ActivatePopup(pt, request.m_points.front().m_name, IMAGE_PLUS);
ActivatePopup(pt, request.m_points.front().m_name, IMAGE_PLUS);
m_work.DrawPlacemark(pt);
m_work.Invalidate();
}
return success;
return true;
}
return false;
}
}

View file

@ -1433,12 +1433,14 @@ bool Framework::SetViewportByURL(string const & url, url_api::Request & request)
if (info.IsValid())
{
// TODO this is hack to kick-off release
request.m_viewportLat = info.m_lat;
request.m_viewportLon = info.m_lon;
// @TODO this is hack to kick-off release
request.m_points.push_back(url_api::Point());
url_api::Point & newPoint = request.m_points.back();
newPoint.m_name = m_stringsBundle.GetString("dropped_pin");
request.m_viewportLat = newPoint.m_lat = info.m_lat;
request.m_viewportLon = newPoint.m_lon = info.m_lon;
request.m_viewportZoomLevel = info.m_zoom;
ShowRectExVisibleScale(info.GetViewport());
return true;