summaryrefslogtreecommitdiff
path: root/platform/macos/app/MapDocument.m
diff options
context:
space:
mode:
authorChris Loer <chris.loer@gmail.com>2018-12-18 17:26:31 -0800
committerChris Loer <chris.loer@mapbox.com>2018-12-21 15:13:48 -0800
commit387fa1800f24a40f5cae2bd9457a5628fe55ba49 (patch)
tree7f6f25517a6475f18d8e46815beab2e03b7251d6 /platform/macos/app/MapDocument.m
parent990e3874f47a566586a8ea4e56d1e3c5057471d8 (diff)
downloadqtlocation-mapboxgl-387fa1800f24a40f5cae2bd9457a5628fe55ba49.tar.gz
[ios, macos] Add "includesIdeographicGlyphs" option to MGLOfflineRegion.
Diffstat (limited to 'platform/macos/app/MapDocument.m')
-rw-r--r--platform/macos/app/MapDocument.m4
1 files changed, 4 insertions, 0 deletions
diff --git a/platform/macos/app/MapDocument.m b/platform/macos/app/MapDocument.m
index d2bc7e9bfc..213aa33107 100644
--- a/platform/macos/app/MapDocument.m
+++ b/platform/macos/app/MapDocument.m
@@ -82,6 +82,7 @@ NSArray<id <MGLAnnotation>> *MBXFlattenedShapes(NSArray<id <MGLAnnotation>> *sha
@property (weak) IBOutlet NSNumberFormatter *minimumOfflinePackZoomLevelFormatter;
@property (weak) IBOutlet NSTextField *maximumOfflinePackZoomLevelField;
@property (weak) IBOutlet NSNumberFormatter *maximumOfflinePackZoomLevelFormatter;
+@property (weak) IBOutlet NSButton *includesIdeographicGlyphsBox;
@end
@@ -931,6 +932,8 @@ NSArray<id <MGLAnnotation>> *MBXFlattenedShapes(NSArray<id <MGLAnnotation>> *sha
self.minimumOfflinePackZoomLevelFormatter.maximum = @(ceil(self.mapView.maximumZoomLevel));
self.maximumOfflinePackZoomLevelFormatter.maximum = @(ceil(self.mapView.maximumZoomLevel));
+ NSString *fontFamilyName = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"MGLIdeographicFontFamilyName"];
+ self.includesIdeographicGlyphsBox.state = fontFamilyName ? NSOffState : NSOnState;
[self.addOfflinePackWindow makeFirstResponder:self.offlinePackNameField];
__weak __typeof__(self) weakSelf = self;
@@ -945,6 +948,7 @@ NSArray<id <MGLAnnotation>> *MBXFlattenedShapes(NSArray<id <MGLAnnotation>> *sha
bounds:strongSelf.mapView.visibleCoordinateBounds
fromZoomLevel:strongSelf.minimumOfflinePackZoomLevelField.integerValue
toZoomLevel:strongSelf.maximumOfflinePackZoomLevelField.integerValue];
+ region.includesIdeographicGlyphs = strongSelf.includesIdeographicGlyphsBox.state == NSOnState;
NSString *name = strongSelf.offlinePackNameField.stringValue;
if (!name.length) {
name = strongSelf.offlinePackNameField.placeholderString;