diff options
Diffstat (limited to 'platform/darwin/src/MGLMapSnapshotter.mm')
-rw-r--r-- | platform/darwin/src/MGLMapSnapshotter.mm | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/platform/darwin/src/MGLMapSnapshotter.mm b/platform/darwin/src/MGLMapSnapshotter.mm index 1d52360d88..d9fa044217 100644 --- a/platform/darwin/src/MGLMapSnapshotter.mm +++ b/platform/darwin/src/MGLMapSnapshotter.mm @@ -86,7 +86,6 @@ const CGFloat MGLSnapshotterMinimumPixelSize = 64; @implementation MGLMapSnapshotter { std::shared_ptr<mbgl::ThreadPool> _mbglThreadPool; - std::shared_ptr<mbgl::FileSource> _mbglFileSource; std::unique_ptr<mbgl::MapSnapshotter> _mbglMapSnapshotter; std::unique_ptr<mbgl::Actor<mbgl::MapSnapshotter::Callback>> _snapshotCallback; } @@ -439,7 +438,7 @@ const CGFloat MGLSnapshotterMinimumPixelSize = 64; - (void)setOptions:(MGLMapSnapshotOptions *)options { _options = options; - _mbglFileSource = std::shared_ptr<mbgl::FileSource>([MGLOfflineStorage sharedOfflineStorage].mbglFileSource); + mbgl::DefaultFileSource *mbglFileSource = [MGLOfflineStorage sharedOfflineStorage].mbglFileSource; _mbglThreadPool = mbgl::sharedThreadPool(); std::string styleURL = std::string([options.styleURL.absoluteString UTF8String]); @@ -470,7 +469,7 @@ const CGFloat MGLSnapshotterMinimumPixelSize = 64; } // 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); } @end |