summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Loer <chris.loer@gmail.com>2018-11-20 21:09:20 +0100
committerŁukasz Paczos <lukasz.paczos@mapbox.com>2018-11-30 21:19:16 +0100
commit5b7a4618d77ed2c383743dbf27895fd359eff370 (patch)
tree49fef3e2adc6572b8b817470a63a0078538f6f40
parent806cb4ae4ce2d954a9f4aec5121ac847ad99c515 (diff)
downloadqtlocation-mapboxgl-5b7a4618d77ed2c383743dbf27895fd359eff370.tar.gz
[ios, macos] Pass program cache path and local font family config options to MGLMapSnapshotter.
(cherry picked from commit 336409b)
-rw-r--r--platform/darwin/src/MGLMapSnapshotter.mm8
1 files 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<mbgl::MapSnapshotter>(mbglFileSource, _mbglThreadPool, style, size, pixelRatio, cameraOptions, coordinateBounds);
+ _mbglMapSnapshotter = std::make_unique<mbgl::MapSnapshotter>(mbglFileSource, _mbglThreadPool, style, size, pixelRatio, cameraOptions, coordinateBounds, config.cacheDir, config.localFontFamilyName);
}
@end