[ios, macos] Pass program cache path and local font family config options to MGLMapSnapshotter.

This commit is contained in:
Chris Loer
2018-11-20 12:09:20 -08:00
committed by Chris Loer
parent afdc243042
commit 336409b861

View File

@@ -16,6 +16,7 @@
#import "MGLStyle.h"
#import "MGLAttributionInfo_Private.h"
#import "MGLLoggingConfiguration_Private.h"
#import "MGLRendererConfiguration.h"
#if TARGET_OS_IPHONE
#import "UIImage+MGLAdditions.h"
@@ -615,8 +616,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