summaryrefslogtreecommitdiff
path: root/ios
diff options
context:
space:
mode:
authorJustin R. Miller <incanus@codesorcery.net>2014-07-09 14:51:54 -0700
committerJustin R. Miller <incanus@codesorcery.net>2014-07-09 14:51:54 -0700
commit035ec18ae55e4d344b73b1be572d3f84526799bd (patch)
tree0cc73cb0a336cfbcf36d1a0b996482966ed8da64 /ios
parent4d76e202fb29e04443c2305c40a376167edbfa9b (diff)
downloadqtlocation-mapboxgl-035ec18ae55e4d344b73b1be572d3f84526799bd.tar.gz
complement of https://github.com/mapbox/mapbox-gl-cocoa/pull/36
Diffstat (limited to 'ios')
-rw-r--r--ios/Info.plist47
-rw-r--r--ios/MBXAppDelegate.h15
-rw-r--r--ios/MBXAppDelegate.m24
-rw-r--r--ios/MBXViewController.h5
-rw-r--r--ios/MBXViewController.mm214
-rw-r--r--ios/img/Default-568h@2x.pngbin18594 -> 0 bytes
-rw-r--r--ios/img/Icon-40.pngbin951 -> 0 bytes
-rw-r--r--ios/img/Icon-40@2x.pngbin1528 -> 0 bytes
-rw-r--r--ios/img/Icon-60.pngbin1313 -> 0 bytes
-rw-r--r--ios/img/Icon-60@2x.pngbin2091 -> 0 bytes
-rw-r--r--ios/img/Icon-72.pngbin1418 -> 0 bytes
-rw-r--r--ios/img/Icon-72@2x.pngbin2442 -> 0 bytes
-rw-r--r--ios/img/Icon-76.pngbin1447 -> 0 bytes
-rw-r--r--ios/img/Icon-76@2x.pngbin2520 -> 0 bytes
-rw-r--r--ios/img/Icon-Small-50.pngbin1118 -> 0 bytes
-rw-r--r--ios/img/Icon-Small-50@2x.pngbin1839 -> 0 bytes
-rw-r--r--ios/img/Icon-Small.pngbin684 -> 0 bytes
-rw-r--r--ios/img/Icon-Small@2x.pngbin1231 -> 0 bytes
-rw-r--r--ios/img/Icon-Spotlight-40.pngbin951 -> 0 bytes
-rw-r--r--ios/img/Icon-Spotlight-40@2x.pngbin1528 -> 0 bytes
-rw-r--r--ios/img/Icon.pngbin1171 -> 0 bytes
-rw-r--r--ios/img/Icon@2x.pngbin1931 -> 0 bytes
-rw-r--r--ios/img/iTunesArtworkbin264721 -> 0 bytes
-rw-r--r--ios/img/iTunesArtwork.pngbin5655 -> 0 bytes
-rw-r--r--ios/img/iTunesArtwork@2xbin661346 -> 0 bytes
-rw-r--r--ios/img/iTunesArtwork@2x.pngbin9293 -> 0 bytes
-rw-r--r--ios/img/locateUser.pngbin4924 -> 0 bytes
-rw-r--r--ios/img/resetPosition.pngbin7332 -> 0 bytes
-rw-r--r--ios/img/toggleDebug.pngbin10524 -> 0 bytes
-rw-r--r--ios/img/toggleStyle.pngbin4966 -> 0 bytes
-rw-r--r--ios/img/unrotate.pngbin8217 -> 0 bytes
-rw-r--r--ios/llmr-app.gyp70
-rw-r--r--ios/main.m18
m---------ios/mapbox-gl-cocoa0
34 files changed, 0 insertions, 393 deletions
diff --git a/ios/Info.plist b/ios/Info.plist
deleted file mode 100644
index 9c96d492aa..0000000000
--- a/ios/Info.plist
+++ /dev/null
@@ -1,47 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
- <key>CFBundleDevelopmentRegion</key>
- <string>en</string>
- <key>CFBundleDisplayName</key>
- <string>${PRODUCT_NAME}</string>
- <key>CFBundleExecutable</key>
- <string>${EXECUTABLE_NAME}</string>
- <key>CFBundleIdentifier</key>
- <string>com.mapbox.${PRODUCT_NAME:rfc1034identifier}</string>
- <key>CFBundleInfoDictionaryVersion</key>
- <string>6.0</string>
- <key>CFBundleName</key>
- <string>${PRODUCT_NAME}</string>
- <key>CFBundlePackageType</key>
- <string>APPL</string>
- <key>CFBundleShortVersionString</key>
- <string>0.0.1</string>
- <key>CFBundleSignature</key>
- <string>LLMR</string>
- <key>CFBundleVersion</key>
- <string>0.0.1</string>
- <key>LSRequiresIPhoneOS</key>
- <true/>
- <key>UIRequiredDeviceCapabilities</key>
- <array>
- <string>armv7</string>
- </array>
- <key>UISupportedInterfaceOrientations</key>
- <array>
- <string>UIInterfaceOrientationPortrait</string>
- <string>UIInterfaceOrientationLandscapeLeft</string>
- <string>UIInterfaceOrientationLandscapeRight</string>
- </array>
- <key>UISupportedInterfaceOrientations~ipad</key>
- <array>
- <string>UIInterfaceOrientationPortrait</string>
- <string>UIInterfaceOrientationPortraitUpsideDown</string>
- <string>UIInterfaceOrientationLandscapeLeft</string>
- <string>UIInterfaceOrientationLandscapeRight</string>
- </array>
- <key>NSHumanReadableCopyright</key>
- <string>(c) 2014 Mapbox</string>
-</dict>
-</plist>
diff --git a/ios/MBXAppDelegate.h b/ios/MBXAppDelegate.h
deleted file mode 100644
index 1023433320..0000000000
--- a/ios/MBXAppDelegate.h
+++ /dev/null
@@ -1,15 +0,0 @@
-//
-// MBXAppDelegate.h
-// ios
-//
-// Created by Justin R. Miller on 1/27/14.
-//
-//
-
-#import <UIKit/UIKit.h>
-
-@interface MBXAppDelegate : UIResponder <UIApplicationDelegate>
-
-@property (strong, nonatomic) UIWindow *window;
-
-@end \ No newline at end of file
diff --git a/ios/MBXAppDelegate.m b/ios/MBXAppDelegate.m
deleted file mode 100644
index 0fbcc6e81f..0000000000
--- a/ios/MBXAppDelegate.m
+++ /dev/null
@@ -1,24 +0,0 @@
-//
-// MBXAppDelegate.m
-// ios
-//
-// Created by Justin R. Miller on 1/27/14.
-//
-//
-
-#import "MBXAppDelegate.h"
-
-#import "MBXViewController.h"
-
-@implementation MBXAppDelegate
-
-- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
-{
- self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
- self.window.rootViewController = [MBXViewController new];
- [self.window makeKeyAndVisible];
-
- return YES;
-}
-
-@end
diff --git a/ios/MBXViewController.h b/ios/MBXViewController.h
deleted file mode 100644
index 924d3af60c..0000000000
--- a/ios/MBXViewController.h
+++ /dev/null
@@ -1,5 +0,0 @@
-#import <UIKit/UIKit.h>
-
-@interface MBXViewController : UIViewController
-
-@end
diff --git a/ios/MBXViewController.mm b/ios/MBXViewController.mm
deleted file mode 100644
index 33e2f6e5ef..0000000000
--- a/ios/MBXViewController.mm
+++ /dev/null
@@ -1,214 +0,0 @@
-#import "MBXViewController.h"
-
-#import "MGLMapView.h"
-
-#import "../common/settings_nsuserdefaults.hpp"
-
-#import <CoreLocation/CoreLocation.h>
-
-@interface MBXViewController () <CLLocationManagerDelegate>
-
-@property (nonatomic) MGLMapView *mapView;
-@property (nonatomic) BOOL debug;
-@property (nonatomic) UIView *palette;
-@property (nonatomic) CLLocationManager *locationManager;
-
-@end
-
-@implementation MBXViewController
-
-llmr::Settings_NSUserDefaults *settings = nullptr;
-
-#pragma mark - Setup
-
-- (id)init
-{
- self = [super init];
-
- if (self)
- {
- [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(saveState:) name:UIApplicationDidEnterBackgroundNotification object:nil];
- [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(restoreState:) name:UIApplicationWillEnterForegroundNotification object:nil];
- }
-
- return self;
-}
-
-- (void)viewDidLoad
-{
- [super viewDidLoad];
-
- self.mapView = [[MGLMapView alloc] initWithFrame:self.view.bounds];
- self.mapView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
- [self.view addSubview:self.mapView];
-
- self.mapView.viewControllerForLayoutGuides = self;
-
- settings = new llmr::Settings_NSUserDefaults();
- [self restoreState:nil];
-
- [self setupDebugUI];
-
- self.locationManager = [CLLocationManager new];
- self.locationManager.delegate = self;
-}
-
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wunused-parameter"
-
-- (void)saveState:(NSNotification *)notification
-{
- if (self.mapView && settings)
- {
- settings->longitude = self.mapView.centerCoordinate.longitude;
- settings->latitude = self.mapView.centerCoordinate.latitude;
- settings->zoom = self.mapView.zoomLevel;
- settings->angle = self.mapView.direction;
- settings->debug = self.mapView.isDebugActive;
- settings->save();
- }
-}
-
-- (void)restoreState:(NSNotification *)notification
-{
- if (self.mapView && settings) {
- settings->load();
- [self.mapView setCenterCoordinate:CLLocationCoordinate2DMake(settings->latitude, settings->longitude) zoomLevel:settings->zoom animated:NO];
- self.mapView.direction = settings->angle;
- [self.mapView setDebugActive:settings->debug];
- }
-}
-
-#pragma clang diagnostic pop
-
-- (void)setupDebugUI
-{
- UITapGestureRecognizer *singleTap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(handleSingleTapGesture:)];
- singleTap.numberOfTapsRequired = 1;
- [self.mapView addGestureRecognizer:singleTap];
-
- NSArray *selectorNames = @[ @"unrotate", @"resetPosition", @"toggleDebug", @"toggleStyle", @"locateUser" ];
- CGFloat buttonSize = 40;
- CGFloat bufferSize = 20;
- CGFloat alpha = 0.75;
- CGFloat paletteWidth = buttonSize + (2 * bufferSize);
- CGFloat paletteHeight = [selectorNames count] * (buttonSize + bufferSize) + bufferSize;
- self.palette = [[UIView alloc] initWithFrame:CGRectMake(self.view.bounds.size.width - paletteWidth,
- (self.view.bounds.size.height - paletteHeight) / 2,
- paletteWidth,
- paletteHeight)];
- self.palette.backgroundColor = [UIColor colorWithWhite:0 alpha:alpha];
- self.palette.autoresizingMask = UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleTopMargin | UIViewAutoresizingFlexibleBottomMargin;
- self.palette.layer.cornerRadius = bufferSize;
- [self.view addSubview:self.palette];
- for (NSString *selectorName in selectorNames)
- {
- UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom];
- button.frame = CGRectMake(bufferSize,
- ([selectorNames indexOfObject:selectorName] * (buttonSize + bufferSize)) + bufferSize,
- buttonSize,
- buttonSize);
- [button setImage:[UIImage imageNamed:[selectorName stringByAppendingString:@".png"]] forState:UIControlStateNormal];
- [button addTarget:self action:NSSelectorFromString(selectorName) forControlEvents:UIControlEventTouchUpInside];
- [self.palette addSubview:button];
- }
-}
-
-- (NSUInteger)supportedInterfaceOrientations
-{
- return UIInterfaceOrientationMaskAll;
-}
-
-#pragma mark - Debugging UI
-
-- (void)handleSingleTapGesture:(UITapGestureRecognizer *)singleTap
-{
- if (singleTap.state == UIGestureRecognizerStateEnded)
- {
- [self togglePalette];
- }
-}
-
-- (void)togglePalette
-{
- if (self.palette.alpha < 1)
- {
- self.palette.userInteractionEnabled = YES;
-
- [UIView animateWithDuration:0.25 animations:^(void)
- {
- self.palette.alpha = 1;
- }];
- }
- else
- {
- self.palette.userInteractionEnabled = NO;
-
- [UIView animateWithDuration:0.25 animations:^(void)
- {
- self.palette.alpha = 0;
- }];
- }
-}
-
-- (void)unrotate
-{
- [self.mapView resetNorth];
-}
-
-- (void)resetPosition
-{
- [self.mapView resetPosition];
-}
-
-- (void)toggleDebug
-{
- [self.mapView toggleDebug];
-
- self.debug = ! self.debug;
-}
-
-- (void)toggleStyle
-{
- [self.mapView toggleStyle];
-}
-
-- (void)locateUser
-{
- [self.locationManager startUpdatingLocation];
-}
-
-#pragma mark - Destruction
-
-- (void)dealloc
-{
- [[NSNotificationCenter defaultCenter] removeObserver:self];
-
- if (settings)
- {
- [self saveState:nil];
- delete settings;
- settings = nullptr;
- }
-}
-
-#pragma mark - User location
-
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wunused-parameter"
-
-- (void)locationManager:(CLLocationManager *)manager didUpdateLocations:(NSArray *)locations
-{
- CLLocation *latestLocation = locations.lastObject;
-
- if ([latestLocation distanceFromLocation:[[CLLocation alloc] initWithLatitude:self.mapView.centerCoordinate.latitude longitude:self.mapView.centerCoordinate.longitude]] > 100)
- {
- [self.mapView setCenterCoordinate:CLLocationCoordinate2DMake(latestLocation.coordinate.latitude, latestLocation.coordinate.longitude) zoomLevel:17 animated:YES];
- }
-
- [self.locationManager stopUpdatingLocation];
-}
-
-#pragma clang diagnostic pop
-
-@end
diff --git a/ios/img/Default-568h@2x.png b/ios/img/Default-568h@2x.png
deleted file mode 100644
index 0891b7aabf..0000000000
--- a/ios/img/Default-568h@2x.png
+++ /dev/null
Binary files differ
diff --git a/ios/img/Icon-40.png b/ios/img/Icon-40.png
deleted file mode 100644
index eca13393e6..0000000000
--- a/ios/img/Icon-40.png
+++ /dev/null
Binary files differ
diff --git a/ios/img/Icon-40@2x.png b/ios/img/Icon-40@2x.png
deleted file mode 100644
index 070d037539..0000000000
--- a/ios/img/Icon-40@2x.png
+++ /dev/null
Binary files differ
diff --git a/ios/img/Icon-60.png b/ios/img/Icon-60.png
deleted file mode 100644
index ff4c6ab4b1..0000000000
--- a/ios/img/Icon-60.png
+++ /dev/null
Binary files differ
diff --git a/ios/img/Icon-60@2x.png b/ios/img/Icon-60@2x.png
deleted file mode 100644
index b7f25955f5..0000000000
--- a/ios/img/Icon-60@2x.png
+++ /dev/null
Binary files differ
diff --git a/ios/img/Icon-72.png b/ios/img/Icon-72.png
deleted file mode 100644
index 0c876f664d..0000000000
--- a/ios/img/Icon-72.png
+++ /dev/null
Binary files differ
diff --git a/ios/img/Icon-72@2x.png b/ios/img/Icon-72@2x.png
deleted file mode 100644
index 6da408204a..0000000000
--- a/ios/img/Icon-72@2x.png
+++ /dev/null
Binary files differ
diff --git a/ios/img/Icon-76.png b/ios/img/Icon-76.png
deleted file mode 100644
index 895b4a1761..0000000000
--- a/ios/img/Icon-76.png
+++ /dev/null
Binary files differ
diff --git a/ios/img/Icon-76@2x.png b/ios/img/Icon-76@2x.png
deleted file mode 100644
index 7bc5208976..0000000000
--- a/ios/img/Icon-76@2x.png
+++ /dev/null
Binary files differ
diff --git a/ios/img/Icon-Small-50.png b/ios/img/Icon-Small-50.png
deleted file mode 100644
index 6d17da4b00..0000000000
--- a/ios/img/Icon-Small-50.png
+++ /dev/null
Binary files differ
diff --git a/ios/img/Icon-Small-50@2x.png b/ios/img/Icon-Small-50@2x.png
deleted file mode 100644
index ac4ec19282..0000000000
--- a/ios/img/Icon-Small-50@2x.png
+++ /dev/null
Binary files differ
diff --git a/ios/img/Icon-Small.png b/ios/img/Icon-Small.png
deleted file mode 100644
index aecbbc8a1d..0000000000
--- a/ios/img/Icon-Small.png
+++ /dev/null
Binary files differ
diff --git a/ios/img/Icon-Small@2x.png b/ios/img/Icon-Small@2x.png
deleted file mode 100644
index 7773852e7a..0000000000
--- a/ios/img/Icon-Small@2x.png
+++ /dev/null
Binary files differ
diff --git a/ios/img/Icon-Spotlight-40.png b/ios/img/Icon-Spotlight-40.png
deleted file mode 100644
index eca13393e6..0000000000
--- a/ios/img/Icon-Spotlight-40.png
+++ /dev/null
Binary files differ
diff --git a/ios/img/Icon-Spotlight-40@2x.png b/ios/img/Icon-Spotlight-40@2x.png
deleted file mode 100644
index 070d037539..0000000000
--- a/ios/img/Icon-Spotlight-40@2x.png
+++ /dev/null
Binary files differ
diff --git a/ios/img/Icon.png b/ios/img/Icon.png
deleted file mode 100644
index 9ca8194eef..0000000000
--- a/ios/img/Icon.png
+++ /dev/null
Binary files differ
diff --git a/ios/img/Icon@2x.png b/ios/img/Icon@2x.png
deleted file mode 100644
index 7c2e8ba037..0000000000
--- a/ios/img/Icon@2x.png
+++ /dev/null
Binary files differ
diff --git a/ios/img/iTunesArtwork b/ios/img/iTunesArtwork
deleted file mode 100644
index ac6a0c58e8..0000000000
--- a/ios/img/iTunesArtwork
+++ /dev/null
Binary files differ
diff --git a/ios/img/iTunesArtwork.png b/ios/img/iTunesArtwork.png
deleted file mode 100644
index b10824b048..0000000000
--- a/ios/img/iTunesArtwork.png
+++ /dev/null
Binary files differ
diff --git a/ios/img/iTunesArtwork@2x b/ios/img/iTunesArtwork@2x
deleted file mode 100644
index fae1dad8bf..0000000000
--- a/ios/img/iTunesArtwork@2x
+++ /dev/null
Binary files differ
diff --git a/ios/img/iTunesArtwork@2x.png b/ios/img/iTunesArtwork@2x.png
deleted file mode 100644
index fdee900aa4..0000000000
--- a/ios/img/iTunesArtwork@2x.png
+++ /dev/null
Binary files differ
diff --git a/ios/img/locateUser.png b/ios/img/locateUser.png
deleted file mode 100644
index e0599e5425..0000000000
--- a/ios/img/locateUser.png
+++ /dev/null
Binary files differ
diff --git a/ios/img/resetPosition.png b/ios/img/resetPosition.png
deleted file mode 100644
index 81269cd4fb..0000000000
--- a/ios/img/resetPosition.png
+++ /dev/null
Binary files differ
diff --git a/ios/img/toggleDebug.png b/ios/img/toggleDebug.png
deleted file mode 100644
index aa5e3042fb..0000000000
--- a/ios/img/toggleDebug.png
+++ /dev/null
Binary files differ
diff --git a/ios/img/toggleStyle.png b/ios/img/toggleStyle.png
deleted file mode 100644
index 59a6f330fb..0000000000
--- a/ios/img/toggleStyle.png
+++ /dev/null
Binary files differ
diff --git a/ios/img/unrotate.png b/ios/img/unrotate.png
deleted file mode 100644
index 63361e99d8..0000000000
--- a/ios/img/unrotate.png
+++ /dev/null
Binary files differ
diff --git a/ios/llmr-app.gyp b/ios/llmr-app.gyp
deleted file mode 100644
index aeccd573f5..0000000000
--- a/ios/llmr-app.gyp
+++ /dev/null
@@ -1,70 +0,0 @@
-{
- 'includes': [
- '../common.gypi',
- '../config.gypi'
- ],
- 'targets': [
- {
- "target_name": "iosapp",
- "product_name": "Mapbox GL",
- "type": "executable",
- "sources": [
- "./main.m",
- "./MBXAppDelegate.h",
- "./MBXAppDelegate.m",
- "./MBXViewController.h",
- "./MBXViewController.mm",
- '<!@(find mapbox-gl-cocoa/mapbox-gl-cocoa -type f -name "*.h")',
- '<!@(find mapbox-gl-cocoa/mapbox-gl-cocoa -type f -name "*.m")',
- '<!@(find mapbox-gl-cocoa/mapbox-gl-cocoa -type f -name "*.mm")',
- "../common/settings_nsuserdefaults.hpp",
- "../common/settings_nsuserdefaults.mm",
- "../common/foundation_request.h",
- "../common/foundation_request.mm",
- ],
- 'product_extension': 'app',
- 'mac_bundle': 1,
- 'mac_bundle_resources': [
- '<!@(find img -type f)',
- '<!@(find mapbox-gl-cocoa/mapbox-gl-cocoa/Resources -type f)',
- '<(SHARED_INTERMEDIATE_DIR)/bin/style.min.js'
- ],
- 'link_settings': {
- 'libraries': [
- '$(SDKROOT)/System/Library/Frameworks/UIKit.framework',
- '$(SDKROOT)/System/Library/Frameworks/OpenGLES.framework',
- '$(SDKROOT)/System/Library/Frameworks/GLKit.framework',
- '$(SDKROOT)/System/Library/Frameworks/CoreLocation.framework',
- '$(SDKROOT)/System/Library/Frameworks/CoreGraphics.framework'
- ],
- },
- 'xcode_settings': {
- 'SDKROOT': 'iphoneos',
- 'SUPPORTED_PLATFORMS':['iphonesimulator','iphoneos'],
- 'ARCHS': [ "armv7", "armv7s", "arm64", "i386" ],
- 'INFOPLIST_FILE': 'Info.plist',
- 'CLANG_CXX_LIBRARY': 'libc++',
- 'CLANG_CXX_LANGUAGE_STANDARD':'c++11',
- 'IPHONEOS_DEPLOYMENT_TARGET':'7.0',
- 'TARGETED_DEVICE_FAMILY': '1,2',
- 'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0',
- 'CLANG_ENABLE_OBJC_ARC': 'YES'
- },
- 'configurations': {
- 'Debug': {
- 'xcode_settings': {
- 'CODE_SIGN_IDENTITY': 'iPhone Developer',
- }
- },
- 'Release': {
- 'xcode_settings': {
- 'CODE_SIGN_IDENTITY': 'iPhone Distribution',
- }
- }
- },
- "dependencies": [
- "../llmr.gyp:llmr-ios"
- ]
- }
- ]
-} \ No newline at end of file
diff --git a/ios/main.m b/ios/main.m
deleted file mode 100644
index 92613c6ab2..0000000000
--- a/ios/main.m
+++ /dev/null
@@ -1,18 +0,0 @@
-//
-// main.m
-// ios
-//
-// Created by Justin R. Miller on 1/27/14.
-//
-//
-
-#import <UIKit/UIKit.h>
-
-#import "MBXAppDelegate.h"
-
-int main(int argc, char * argv[])
-{
- @autoreleasepool {
- return UIApplicationMain(argc, argv, nil, NSStringFromClass([MBXAppDelegate class]));
- }
-}
diff --git a/ios/mapbox-gl-cocoa b/ios/mapbox-gl-cocoa
-Subproject 698f31b3c777b50839aa116340614f6f18d5087
+Subproject 93615fe8a3123332d608eaae0a9b804059bd858