From e1d2fcee09088e8b6c28504713f17d7eef0477f3 Mon Sep 17 00:00:00 2001 From: Jason Wray Date: Tue, 1 Aug 2017 19:14:28 -0400 Subject: [ios] Fix iosapp's third-party tiles SSL exemption, non-retinaness --- platform/ios/app/Info.plist | 13 ------------- platform/ios/app/MBXViewController.m | 5 ++--- 2 files changed, 2 insertions(+), 16 deletions(-) diff --git a/platform/ios/app/Info.plist b/platform/ios/app/Info.plist index f05e737a49..167e66fa09 100644 --- a/platform/ios/app/Info.plist +++ b/platform/ios/app/Info.plist @@ -51,19 +51,6 @@ UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight - NSAppTransportSecurity - - NSExceptionDomains - - stamen.com - - NSIncludesSubdomains - - NSTemporaryExceptionAllowsInsecureHTTPLoads - - - - UIApplicationShortcutItems diff --git a/platform/ios/app/MBXViewController.m b/platform/ios/app/MBXViewController.m index abdaaa5292..992b7d587a 100644 --- a/platform/ios/app/MBXViewController.m +++ b/platform/ios/app/MBXViewController.m @@ -1260,9 +1260,8 @@ typedef NS_ENUM(NSInteger, MBXSettingsMiscellaneousRows) { - (void)styleRasterSource { - // 3rd party raster source requires NSAppTransportSecurity exception for stamen.com - NSArray *tileURLTemplates = @[@"http://a.tile.stamen.com/terrain-background/{z}/{x}/{y}.jpg"]; - MGLRasterSource *rasterSource = [[MGLRasterSource alloc] initWithIdentifier:@"style-raster-source-id" tileURLTemplates:tileURLTemplates options:@{ + NSString *tileURL = [NSString stringWithFormat:@"https://stamen-tiles.a.ssl.fastly.net/terrain-background/{z}/{x}/{y}%@.jpg", UIScreen.mainScreen.nativeScale > 1 ? @"@2x" : @""]; + MGLRasterSource *rasterSource = [[MGLRasterSource alloc] initWithIdentifier:@"style-raster-source-id" tileURLTemplates:@[tileURL] options:@{ MGLTileSourceOptionTileSize: @256, }]; [self.mapView.style addSource:rasterSource]; -- cgit v1.2.1