diff options
author | Minh Nguyễn <mxn@1ec5.org> | 2019-10-04 14:07:16 -0700 |
---|---|---|
committer | Minh Nguyễn <mxn@1ec5.org> | 2019-10-04 14:07:16 -0700 |
commit | e46f36e2277e96e0f67785044cf0157794068d80 (patch) | |
tree | c19cefd9902dad294695317dd3efa80c14f8cc24 | |
parent | 33a70100b839793311ecc73c873c063c7cf65e31 (diff) | |
download | qtlocation-mapboxgl-upstream/1ec5-macosapp-maximum-tiles-default.tar.gz |
Added user default for tile capupstream/1ec5-macosapp-maximum-tiles-default
-rw-r--r-- | platform/macos/app/AppDelegate.m | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/platform/macos/app/AppDelegate.m b/platform/macos/app/AppDelegate.m index eda989d7f9..8a184b094d 100644 --- a/platform/macos/app/AppDelegate.m +++ b/platform/macos/app/AppDelegate.m @@ -132,6 +132,11 @@ NSString * const MGLLastMapDebugMaskDefaultsKey = @"MGLLastMapDebugMask"; } [self.offlinePacksArrayController bind:@"content" toObject:[MGLOfflineStorage sharedOfflineStorage] withKeyPath:@"packs" options:nil]; + + NSInteger maximumAllowedMapboxTiles = [[NSUserDefaults standardUserDefaults] integerForKey:@"MBXMaximumAllowedMapboxTiles"]; + if (maximumAllowedMapboxTiles) { + [[MGLOfflineStorage sharedOfflineStorage] setMaximumAllowedMapboxTiles:maximumAllowedMapboxTiles]; + } } - (void)applicationWillTerminate:(NSNotification *)notification { |