From d5868d3da822f2bf3297229bd879e76853108a63 Mon Sep 17 00:00:00 2001 From: Bruno de Oliveira Abinader Date: Tue, 19 Mar 2019 16:57:36 +0200 Subject: [core] Remove file source from public Map ctor --- bin/render.cpp | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'bin') diff --git a/bin/render.cpp b/bin/render.cpp index 87a1e670b9..41701913b0 100644 --- a/bin/render.cpp +++ b/bin/render.cpp @@ -6,7 +6,6 @@ #include #include -#include #include #include @@ -76,17 +75,12 @@ int main(int argc, char *argv[]) { using namespace mbgl; util::RunLoop loop; - DefaultFileSource fileSource(cache_file, asset_root); - - // Set access token if present - if (token.size()) { - fileSource.setAccessToken(std::string(token)); - } ThreadPool threadPool(4); HeadlessFrontend frontend({ width, height }, pixelRatio, threadPool); - Map map(frontend, MapObserver::nullObserver(), frontend.getSize(), pixelRatio, - fileSource, threadPool, MapOptions().withMapMode(MapMode::Static)); + Map map(frontend, MapObserver::nullObserver(), frontend.getSize(), pixelRatio, threadPool, + MapOptions().withMapMode(MapMode::Static), + ResourceOptions().withCachePath(cache_file).withAssetPath(asset_root).withAccessToken(std::string(token))); if (style.find("://") == std::string::npos) { style = std::string("file://") + style; -- cgit v1.2.1