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:
authorIlya Grechuhin <i.grechuhin@mapswithme.com>2015-07-30 13:52:50 +0300
committerAlex Zolotarev <alex@maps.me>2015-09-23 02:59:16 +0300
commit6d6bd1c2667d89966bf13018baef64a7ba0894ee (patch)
tree971c1ca11359a936d37c0691dfdc5ff0bd2ecd48 /iphone/Maps/Classes/MWMPlacePageViewManager.mm
parent04118c9f5123c28c84a37f57991176355f8697a6 (diff)
[ios] Review fixes.
Diffstat (limited to 'iphone/Maps/Classes/MWMPlacePageViewManager.mm')
-rw-r--r--iphone/Maps/Classes/MWMPlacePageViewManager.mm9
1 files changed, 3 insertions, 6 deletions
diff --git a/iphone/Maps/Classes/MWMPlacePageViewManager.mm b/iphone/Maps/Classes/MWMPlacePageViewManager.mm
index 037592c27a..4cc251c739 100644
--- a/iphone/Maps/Classes/MWMPlacePageViewManager.mm
+++ b/iphone/Maps/Classes/MWMPlacePageViewManager.mm
@@ -172,10 +172,8 @@ typedef NS_ENUM(NSUInteger, MWMPlacePageManagerState)
{
auto & f = GetFramework();
m2::PointD const & destination = m_userMark->GetUserMark()->GetOrg();
- CLLocationCoordinate2D const & myCoordinate = [MapsAppDelegate theApp].m_locationManager.lastLocation.coordinate;
- m2::PointD const myPosition {MercatorBounds::LonToX(myCoordinate.longitude), MercatorBounds::LatToY(myCoordinate.latitude)};
- routing::RouterType const actualyRoterType = f.GetBestRouter(myPosition, destination);
- f.SetRouter(actualyRoterType);
+ m2::PointD const myPosition (ToMercator([MapsAppDelegate theApp].m_locationManager.lastLocation.coordinate));
+ f.SetRouter(f.GetBestRouter(myPosition, destination));
[self.delegate buildRoute:destination];
}
@@ -268,8 +266,7 @@ typedef NS_ENUM(NSUInteger, MWMPlacePageManagerState)
if (!location || !m_userMark)
return;
- CLLocationCoordinate2D const coord = location.coordinate;
- CGFloat angle = ang::AngleTo(MercatorBounds::FromLatLon(coord.latitude, coord.longitude), m_userMark->GetUserMark()->GetOrg()) + info.m_bearing;
+ CGFloat const angle = ang::AngleTo(ToMercator(location.coordinate), m_userMark->GetUserMark()->GetOrg()) + info.m_bearing;
CGAffineTransform transform = CGAffineTransformMakeRotation(M_PI_2 - angle);
[self.placePage setDirectionArrowTransform:transform];
[self.directionView setDirectionArrowTransform:transform];