From 92a7f73bbe10f817d5c2d607ba07fc69b859593b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konstantin=20Ka=CC=88fer?= Date: Thu, 22 Jan 2015 07:02:14 -0800 Subject: fixes for linux --- linux/main.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'linux') diff --git a/linux/main.cpp b/linux/main.cpp index c324e76094..fdcf8baab9 100644 --- a/linux/main.cpp +++ b/linux/main.cpp @@ -4,7 +4,8 @@ #include #include #include -#include +#include +#include #include #include @@ -64,7 +65,9 @@ int main(int argc, char *argv[]) { sigaction(SIGINT, &sigIntHandler, NULL); view = new GLFWView(); - mbgl::CachingHTTPFileSource fileSource(); + + mbgl::SQLiteCache cache("/tmp/mbgl-cache.db"); + mbgl::DefaultFileSource fileSource(&cache); mbgl::Map map(*view, fileSource); // Load settings @@ -78,12 +81,13 @@ int main(int argc, char *argv[]) { if (token == nullptr) { mbgl::Log::Warning(mbgl::Event::Setup, "no access token set. mapbox.com tiles won't work."); } else { - fileSource.setAccessToken(std::string(token)); + map.setAccessToken(std::string(token)); } // Load style - if (style.empty()) + if (style.empty()) { style = std::string("asset://") + std::string("styles/bright-v7.json"); + } map.setStyleURL(style); -- cgit v1.2.1