diff options
author | m-stephen <truestyle2005@163.com> | 2019-07-16 11:39:34 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-16 11:39:34 +0800 |
commit | d2434d07517619d390e2e1f4b7952f6cf2c9e4ff (patch) | |
tree | 80f44eb79ebf47dd2fb7ebf1a5a8835615d61ec9 /platform/ios | |
parent | 3c488e05efdb9415e658fa820504692b906c3443 (diff) | |
download | qtlocation-mapboxgl-d2434d07517619d390e2e1f4b7952f6cf2c9e4ff.tar.gz |
[ios , macos] Exclude CJK resources from offline download by default (#14952)
* [iOS, macOS] exclude CJK glyphs resources download by default.
* [iOS, macOS] update iosapp
* [iOS, macOS] update macOS
* [iOS, macOS] update iOS change log
* [iOS, macOS] update macOS change log
* [iOS, macOS] update comment & add test cases
* Update platform/darwin/test/MGLOfflineRegionTests.m
Co-Authored-By: Jason Wray <friedbunny@users.noreply.github.com>
* Update platform/darwin/test/MGLOfflineRegionTests.m
Co-Authored-By: Jason Wray <friedbunny@users.noreply.github.com>
* Update platform/darwin/test/MGLOfflineRegionTests.m
Co-Authored-By: Jason Wray <friedbunny@users.noreply.github.com>
* Update platform/ios/CHANGELOG.md
Co-Authored-By: Jason Wray <friedbunny@users.noreply.github.com>
* Update platform/macos/CHANGELOG.md
Co-Authored-By: Jason Wray <friedbunny@users.noreply.github.com>
* Update platform/darwin/test/MGLOfflineRegionTests.m
Co-Authored-By: Jason Wray <friedbunny@users.noreply.github.com>
Diffstat (limited to 'platform/ios')
-rw-r--r-- | platform/ios/CHANGELOG.md | 3 | ||||
-rw-r--r-- | platform/ios/app/MBXOfflinePacksTableViewController.m | 6 |
2 files changed, 7 insertions, 2 deletions
diff --git a/platform/ios/CHANGELOG.md b/platform/ios/CHANGELOG.md index b187db42a3..61b0fbd9e5 100644 --- a/platform/ios/CHANGELOG.md +++ b/platform/ios/CHANGELOG.md @@ -8,6 +8,9 @@ Mapbox welcomes participation and contributions from everyone. Please read [CONT * Fixed a custom geometry source bug caused by using the outdated tiles after style update [#15112](https://github.com/mapbox/mapbox-gl-native/pull/15112) +### Other changes +* Ideographic glyphs from Chinese, Japanese, and Korean are no longer downloaded by default as part of offline packs; they are instead rendered on-device, saving bandwidth and storage while improving performance. ([#14176](https://github.com/mapbox/mapbox-gl-native/pull/14176)) + ## 5.2.0 ### Offline maps diff --git a/platform/ios/app/MBXOfflinePacksTableViewController.m b/platform/ios/app/MBXOfflinePacksTableViewController.m index e237df4019..4459711b58 100644 --- a/platform/ios/app/MBXOfflinePacksTableViewController.m +++ b/platform/ios/app/MBXOfflinePacksTableViewController.m @@ -103,8 +103,10 @@ static NSString * const MBXOfflinePacksTableViewActiveCellReuseIdentifier = @"Ac } MGLTilePyramidOfflineRegion *region = [[MGLTilePyramidOfflineRegion alloc] initWithStyleURL:mapView.styleURL bounds:mapView.visibleCoordinateBounds fromZoomLevel:mapView.zoomLevel toZoomLevel:mapView.maximumZoomLevel]; - BOOL hasIdeographicFontFamilyName = !![[NSBundle mainBundle] objectForInfoDictionaryKey:@"MGLIdeographicFontFamilyName"]; - region.includesIdeographicGlyphs = hasIdeographicFontFamilyName; + id ideographicFontFamilyName = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"MGLIdeographicFontFamilyName"]; + if([ideographicFontFamilyName isKindOfClass:[NSNumber class]] && ![ideographicFontFamilyName boolValue]){ + region.includesIdeographicGlyphs = YES; + } NSData *context = [NSKeyedArchiver archivedDataWithRootObject:@{ MBXOfflinePackContextNameKey: name, }]; |