Merge pull request #1329 from mapbox/1225-start-token
MapboxGL Startup Infrastructure
This commit is contained in:
6
include/mbgl/ios/MGLAccountManager.h
Normal file
6
include/mbgl/ios/MGLAccountManager.h
Normal file
@@ -0,0 +1,6 @@
|
||||
@interface MGLAccountManager : NSObject
|
||||
|
||||
+ (void) setAccessToken:(NSString *) accessToken;
|
||||
+ (NSString *) accessToken;
|
||||
|
||||
@end
|
||||
@@ -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 */
|
||||
|
||||
@@ -2,3 +2,4 @@
|
||||
#import "MGLMapView.h"
|
||||
#import "MGLTypes.h"
|
||||
#import "MGLUserLocation.h"
|
||||
#import "MGLAccountManager.h"
|
||||
Reference in New Issue
Block a user