[codereview, iOS] global 2 screen coord fix.

This commit is contained in:
Dmitry Kunin 2013-04-25 18:18:21 +03:00 committed by Alex Zolotarev
parent 722fc981aa
commit bf043348a1
2 changed files with 3 additions and 0 deletions

View file

@ -807,6 +807,8 @@ NSInteger compareAddress(id l, id r, void * context)
m_balloonView.isCurrentPosition = NO;
m_balloonView.editedBookmark = pair<int, int>(-1, -1);
CGFloat const scaleFactor = self.view.contentScaleFactor;
point = GetFramework().GtoP(point);
[m_balloonView showInView:self.view atPoint:CGPointMake(point.x / scaleFactor, point.y / scaleFactor)];
}

View file

@ -227,6 +227,7 @@ void InitLocalizedStrings()
m2::PointD point(MercatorBounds::LonToX(request.m_viewportLon),
MercatorBounds::LatToY(request.m_viewportLat));
NSString * name = [NSString stringWithUTF8String: request.m_points.front().m_name.c_str()];
[m_mapViewController showBalloonWithText:name andGlobalPoint:point];