diff options
Diffstat (limited to 'macosx')
-rw-r--r-- | macosx/llmr-app.gyp | 1 | ||||
-rw-r--r-- | macosx/main.mm | 10 |
2 files changed, 10 insertions, 1 deletions
diff --git a/macosx/llmr-app.gyp b/macosx/llmr-app.gyp index 83bcd0f039..02319da94b 100644 --- a/macosx/llmr-app.gyp +++ b/macosx/llmr-app.gyp @@ -21,6 +21,7 @@ 'mac_bundle': 1, 'mac_bundle_resources': [ 'Icon.icns', + '<(SHARED_INTERMEDIATE_DIR)/bin/style.min.js' ], 'xcode_settings': { 'SDKROOT': 'macosx', diff --git a/macosx/main.mm b/macosx/main.mm index 174b0f1b1f..4c5da2f329 100644 --- a/macosx/main.mm +++ b/macosx/main.mm @@ -1,6 +1,8 @@ #include "../common/settings_nsuserdefaults.hpp" #include "../common/glfw_view.hpp" +#import <Foundation/Foundation.h> + int main() { GLFWView view; llmr::Map map(view); @@ -10,7 +12,13 @@ int main() { map.setLonLatZoom(settings.longitude, settings.latitude, settings.zoom); map.setAngle(settings.angle); map.setDebug(settings.debug); - map.toggleRaster(); + + // Load style + NSString *path = [[NSBundle mainBundle] pathForResource:@"style.min" ofType:@"js"]; + NSString *json = [NSString stringWithContentsOfFile:path + encoding:[NSString defaultCStringEncoding] + error:nil]; + map.setStyleJSON((std::string)[json cStringUsingEncoding:[NSString defaultCStringEncoding]]); // fprintf(stderr, "lon: %f, lat: %f, zoom: %f, angle: %f, debug: %d\n", settings.l) |