From 5b7a4618d77ed2c383743dbf27895fd359eff370 Mon Sep 17 00:00:00 2001 From: Chris Loer Date: Tue, 20 Nov 2018 21:09:20 +0100 Subject: [ios, macos] Pass program cache path and local font family config options to MGLMapSnapshotter. (cherry picked from commit 336409b) --- platform/darwin/src/MGLMapSnapshotter.mm | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/platform/darwin/src/MGLMapSnapshotter.mm b/platform/darwin/src/MGLMapSnapshotter.mm index 590c387145..200f69f3b2 100644 --- a/platform/darwin/src/MGLMapSnapshotter.mm +++ b/platform/darwin/src/MGLMapSnapshotter.mm @@ -15,6 +15,7 @@ #import "NSBundle+MGLAdditions.h" #import "MGLStyle.h" #import "MGLAttributionInfo_Private.h" +#import "MGLRendererConfiguration.h" #if TARGET_OS_IPHONE #import "UIImage+MGLAdditions.h" @@ -158,7 +159,7 @@ const CGFloat MGLSnapshotterMinimumPixelSize = 64; [NSException raise:NSInternalInconsistencyException format:@"Already started this snapshotter."]; } - + self.completion = completion; self.resultQueue = queue; self.cancelled = NO; @@ -560,8 +561,11 @@ const CGFloat MGLSnapshotterMinimumPixelSize = 64; coordinateBounds = MGLLatLngBoundsFromCoordinateBounds(options.coordinateBounds); } + // App-global configuration + MGLRendererConfiguration* config = [MGLRendererConfiguration currentConfiguration]; + // Create the snapshotter - _mbglMapSnapshotter = std::make_unique(mbglFileSource, _mbglThreadPool, style, size, pixelRatio, cameraOptions, coordinateBounds); + _mbglMapSnapshotter = std::make_unique(mbglFileSource, _mbglThreadPool, style, size, pixelRatio, cameraOptions, coordinateBounds, config.cacheDir, config.localFontFamilyName); } @end -- cgit v1.2.1