diff options
author | Chris Loer <chris.loer@gmail.com> | 2018-11-20 21:09:20 +0100 |
---|---|---|
committer | Łukasz Paczos <lukas.paczos@gmail.com> | 2018-11-30 18:51:17 +0100 |
commit | 25a3a134638ae45219637f0804e67a9006c59524 (patch) | |
tree | 49359e331d1fedca17dedf45ce1cba9ce101d097 | |
parent | c11c64a5b6f71ea879e3ae7a9fb4e784d87ef854 (diff) | |
download | qtlocation-mapboxgl-25a3a134638ae45219637f0804e67a9006c59524.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.mm | 8 |
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 |