From 0f3a6b16df10d9926e2f309d9bd541c6d572f1f7 Mon Sep 17 00:00:00 2001 From: Alex Zolotarev Date: Wed, 25 Jun 2014 00:52:27 -1000 Subject: [PATCH] [ios] Draw altitude and speed in the My Position label --- iphone/Maps/Classes/PlacePageView.mm | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/iphone/Maps/Classes/PlacePageView.mm b/iphone/Maps/Classes/PlacePageView.mm index 9f45c92b63..9f638b2916 100644 --- a/iphone/Maps/Classes/PlacePageView.mm +++ b/iphone/Maps/Classes/PlacePageView.mm @@ -124,6 +124,9 @@ typedef NS_ENUM(NSUInteger, CellRow) } PlacePageInfoCell * cell = (PlacePageInfoCell *)[self.tableView cellForRowAtIndexPath:[NSIndexPath indexPathForRow:ROW_COMMON inSection:0]]; [cell updateDistance]; + + if ([self isMarkOfType:UserMark::MY_POSITION]) + self.typeLabel.text = [[MapsAppDelegate theApp].m_locationManager formatSpeedAndAltitude]; } - (void)onCompassUpdate:(location::CompassInfo const &)info @@ -229,7 +232,10 @@ typedef NS_ENUM(NSUInteger, CellRow) [self.titleLabel sizeToFit]; self.titleLabel.origin = CGPointMake(23, 29); - self.typeLabel.text = self.types; + if ([self isMarkOfType:UserMark::MY_POSITION]) + self.typeLabel.text = [[MapsAppDelegate theApp].m_locationManager formatSpeedAndAltitude]; + else + self.typeLabel.text = self.types; self.typeLabel.width = [self typesWidth]; [self.typeLabel sizeToFit]; self.typeLabel.origin = CGPointMake(self.titleLabel.minX + 1, self.titleLabel.maxY + 1);