move Linux & OS X to per-map access tokens

This commit is contained in:
Justin R. Miller
2014-07-09 18:08:53 -07:00
parent e946ef99d0
commit cfbd9f2469
2 changed files with 2 additions and 4 deletions

View File

@@ -52,8 +52,6 @@ int main(int argc, char *argv[]) {
std::stringstream stylejson;
stylejson << stylefile.rdbuf();
llmr::setMapboxAccessToken(mapbox_access_token);
view = new GLFWView();
llmr::Map map(*view);
@@ -64,6 +62,7 @@ int main(int argc, char *argv[]) {
map.setDebug(settings.debug);
// Load style
map.setAccessToken(mapbox_access_token);
map.setStyleJSON(stylejson.str());
int ret = view->run();

View File

@@ -5,8 +5,6 @@
#import <Foundation/Foundation.h>
int main() {
llmr::setMapboxAccessToken(mapbox_access_token);
GLFWView view;
llmr::Map map(view);
@@ -17,6 +15,7 @@ int main() {
map.setDebug(settings.debug);
// Load style
map.setAccessToken(mapbox_access_token);
NSString *path = [[NSBundle mainBundle] pathForResource:@"style.min" ofType:@"js"];
NSString *json = [NSString stringWithContentsOfFile:path
encoding:[NSString defaultCStringEncoding]