Merge pull request #1329 from mapbox/1225-start-token

MapboxGL Startup Infrastructure
This commit is contained in:
Brad Leege
2015-05-05 13:00:25 -05:00
8 changed files with 88 additions and 16 deletions

View File

@@ -0,0 +1,6 @@
@interface MGLAccountManager : NSObject
+ (void) setAccessToken:(NSString *) accessToken;
+ (NSString *) accessToken;
@end

View File

@@ -20,6 +20,11 @@ IB_DESIGNABLE
/** @name Initializing a Map View */
/** Initialize a map view with the default style, given frame, and access token set in MapboxGL singleton.
* @param frame The frame with which to initialize the map view.
* @return An initialized map view, or `nil` if the map view was unable to be initialized. */
- (instancetype)initWithFrame:(CGRect)frame;
/** Initialize a map view with the default style and a given frame and access token.
* @param frame The frame with which to initialize the map view.
* @param accessToken A Mapbox API access token.
@@ -33,8 +38,6 @@ IB_DESIGNABLE
* @return An initialized map view, or `nil` if the map view was unable to be initialized. */
- (instancetype)initWithFrame:(CGRect)frame accessToken:(NSString *)accessToken styleURL:(NSURL *)styleURL;
- (instancetype)initWithFrame:(CGRect)frame __attribute__((unavailable("Instantiating an MGLMapView requires setting a style and/or an access token.")));
#pragma mark - Authorizing Access
/** @name Authorizing Access */

View File

@@ -2,3 +2,4 @@
#import "MGLMapView.h"
#import "MGLTypes.h"
#import "MGLUserLocation.h"
#import "MGLAccountManager.h"