diff options
author | John Firebaugh <john.firebaugh@gmail.com> | 2014-12-04 17:03:23 -0800 |
---|---|---|
committer | John Firebaugh <john.firebaugh@gmail.com> | 2014-12-04 17:03:23 -0800 |
commit | ff640132de0fe855314a8fd86adae3a2fb33237b (patch) | |
tree | f3a794ad1a68ad91626a48727cdde0146152316d /macosx | |
parent | 0a942b6f143373c30fdd2027ff75fdb3b0c71551 (diff) | |
download | qtlocation-mapboxgl-ff640132de0fe855314a8fd86adae3a2fb33237b.tar.gz |
Move setAccessToken to CachingHTTPFileSource
Diffstat (limited to 'macosx')
-rw-r--r-- | macosx/main.mm | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/macosx/main.mm b/macosx/main.mm index ca1a212551..228b05f0b4 100644 --- a/macosx/main.mm +++ b/macosx/main.mm @@ -96,11 +96,10 @@ int main() { map.setBearing(settings.bearing); map.setDebug(settings.debug); - // Set access token if present NSString *accessToken = [[NSProcessInfo processInfo] environment][@"MAPBOX_ACCESS_TOKEN"]; - if ( ! accessToken) mbgl::Log::Warning(mbgl::Event::Setup, "No access token set. Mapbox vector tiles won't work."); - if (accessToken) map.setAccessToken([accessToken cStringUsingEncoding:[NSString defaultCStringEncoding]]); + if (!accessToken) mbgl::Log::Warning(mbgl::Event::Setup, "No access token set. Mapbox vector tiles won't work."); + if (accessToken) fileSource.setAccessToken([accessToken cStringUsingEncoding:[NSString defaultCStringEncoding]]); // Load style const std::string path([[[NSBundle mainBundle] pathForResource:@"bright-v6" ofType:@"json" inDirectory:@"styles/"] UTF8String]); |