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:
authorIgor Khmurets <subzero@mapswithme.com>2014-03-24 15:53:46 +0400
committerAlex Zolotarev <alex@maps.me>2015-09-23 02:13:42 +0300
commit731aabc0f2a5ab10a2b1791da195f678d86bc4d6 (patch)
treea22c78524a018e0b3d93f361166490cbd4c553c6 /iphone/Maps/Classes/ContextViews.mm
parent65601a7023b90b74d6a724d35f95002e06935d0c (diff)
[ios] Fixed place page context views behavior
Diffstat (limited to 'iphone/Maps/Classes/ContextViews.mm')
-rw-r--r--iphone/Maps/Classes/ContextViews.mm10
1 files changed, 8 insertions, 2 deletions
diff --git a/iphone/Maps/Classes/ContextViews.mm b/iphone/Maps/Classes/ContextViews.mm
index fae65f9504..bd66370ffe 100644
--- a/iphone/Maps/Classes/ContextViews.mm
+++ b/iphone/Maps/Classes/ContextViews.mm
@@ -4,6 +4,7 @@
#import "LocationManager.h"
#import "MapsAppDelegate.h"
#import "Framework.h"
+#include "../../../map/measurement_utils.hpp"
@implementation LocationImageView
@@ -122,13 +123,16 @@
{
double const longitude = MercatorBounds::XToLon(self.pinPoint.x);
double const latitude = MercatorBounds::YToLat(self.pinPoint.y);
- NSString * coordinates = [NSString stringWithFormat:@"%@ %@", [self coordinateString:longitude digitsCount:7], [self coordinateString:latitude digitsCount:7]];
+ NSString * coordinates = [NSString stringWithFormat:@"%@ %@", [self coordinateString:longitude digitsCount:6], [self coordinateString:latitude digitsCount:6]];
[UIPasteboard generalPasteboard].string = coordinates;
}
- (void)copyDegreesLocation:(id)sender
{
- [self copyDecimalLocation:nil];
+ double const latitude = MercatorBounds::YToLat(self.pinPoint.y);
+ double const longitude = MercatorBounds::XToLon(self.pinPoint.x);
+ string const coordinates = MeasurementUtils::FormatLatLonAsDMS(latitude, longitude, 3);
+ [UIPasteboard generalPasteboard].string = [NSString stringWithUTF8String:coordinates.c_str()];
}
- (UILabel *)longitudeValueLabel
@@ -202,6 +206,8 @@
self = [super initWithFrame:frame];
self.userInteractionEnabled = YES;
+ UITapGestureRecognizer * tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tap:)];
+ [self addGestureRecognizer:tap];
return self;
}