From 4de7f89f47ba286b00cc3510f07b1cceb3a3c57e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Minh=20Nguy=E1=BB=85n?= Date: Sun, 10 May 2015 04:19:01 -0700 Subject: [PATCH] Turned copyright notices into action buttons --- platform/ios/MGLMapView.mm | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/platform/ios/MGLMapView.mm b/platform/ios/MGLMapView.mm index c7bceb1c7..49ed42346 100644 --- a/platform/ios/MGLMapView.mm +++ b/platform/ios/MGLMapView.mm @@ -1255,12 +1255,13 @@ std::chrono::steady_clock::duration secondsAsDuration(float duration) - (void)showAttribution { - UIActionSheet *sheet = [[UIActionSheet alloc] initWithTitle:@"© Mapbox © OpenStreetMap" + UIActionSheet *sheet = [[UIActionSheet alloc] initWithTitle:@"Mapbox GL for iOS" delegate:self cancelButtonTitle:@"Cancel" destructiveButtonTitle:nil otherButtonTitles: - @"About This Map", + @"© Mapbox", + @"© OpenStreetMap", @"Improve This Map", nil]; [sheet showFromRect:self.attributionButton.frame inView:self animated:YES]; @@ -1274,6 +1275,11 @@ std::chrono::steady_clock::duration secondsAsDuration(float duration) [NSURL URLWithString:@"https://www.mapbox.com/about/maps/"]]; } else if (buttonIndex == actionSheet.firstOtherButtonIndex + 1) + { + [[UIApplication sharedApplication] openURL: + [NSURL URLWithString:@"http://www.openstreetmap.org/about/"]]; + } + else if (buttonIndex == actionSheet.firstOtherButtonIndex + 2) { [[UIApplication sharedApplication] openURL: [NSURL URLWithString:@"https://www.mapbox.com/map-feedback/"]];