diff options
-rw-r--r-- | platform/ios/app/Info.plist | 13 | ||||
-rw-r--r-- | 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 @@ <string>UIInterfaceOrientationLandscapeLeft</string> <string>UIInterfaceOrientationLandscapeRight</string> </array> - <key>NSAppTransportSecurity</key> - <dict> - <key>NSExceptionDomains</key> - <dict> - <key>stamen.com</key> - <dict> - <key>NSIncludesSubdomains</key> - <true/> - <key>NSTemporaryExceptionAllowsInsecureHTTPLoads</key> - <true/> - </dict> - </dict> - </dict> <key>UIApplicationShortcutItems</key> <array> <dict> 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]; |