summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMinh Nguyễn <mxn@1ec5.org>2015-05-20 10:45:26 -0700
committerMinh Nguyễn <mxn@1ec5.org>2015-05-20 10:45:26 -0700
commit9a57464f823b36dc0c7b0db75f742a40513ffc87 (patch)
tree52f950a58499014d2557494016aa677b54b724e6 /include
parenta04703e2d59ccedf32ef9bbd22169640a5aeec50 (diff)
downloadqtlocation-mapboxgl-9a57464f823b36dc0c7b0db75f742a40513ffc87.tar.gz
Removed accessToken from MGLMapView public API
With helpful instructions for migrating to Info.plist or the `MGLAccountManager` API.
Diffstat (limited to 'include')
-rw-r--r--include/mbgl/ios/MGLMapView.h27
1 files changed, 11 insertions, 16 deletions
diff --git a/include/mbgl/ios/MGLMapView.h b/include/mbgl/ios/MGLMapView.h
index 9d7b5c9019..2d6589bf0d 100644
--- a/include/mbgl/ios/MGLMapView.h
+++ b/include/mbgl/ios/MGLMapView.h
@@ -20,30 +20,25 @@ 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. */
+/** Initializes and returns a newly allocated map view with the specified frame and the default style.
+* @param frame The frame for the view, measured in points.
+* @return An initialized map view or `nil` if the map view couldn’t be created. */
- (instancetype)initWithFrame:(CGRect)frame;
+- (instancetype)initWithFrame:(CGRect)frame accessToken:(NSString *)accessToken __attribute__((unavailable("Use -initWithFrame:. Set MGLMapboxAccessToken in the Info.plist or call +[MGLAccountManager setAccessToken:].")));
-/** 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.
-* @return An initialized map view, or `nil` if the map view was unable to be initialized. */
-- (instancetype)initWithFrame:(CGRect)frame accessToken:(NSString *)accessToken;
-
-/** Initialize a map view with a given frame, access token, and style URL.
- * @param frame The frame with which to initialize the map view.
- * @param accessToken A Mapbox API access token.
- * @param styleURL The map style URL to use. Can be either an HTTP/HTTPS URL or a Mapbox map ID style URL (`mapbox://<user.style>`).
- * @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;
+/** Initializes and returns a newly allocated map view with the specified frame and style URL.
+* @param frame The frame for the view, measured in points.
+* @param styleURL The map style URL to use. Can be either an HTTP/HTTPS URL or a Mapbox map ID style URL (`mapbox://<user.style>`).
+* @return An initialized map view or `nil` if the map view couldn’t be created. */
+- (instancetype)initWithFrame:(CGRect)frame styleURL:(NSURL *)styleURL;
+- (instancetype)initWithFrame:(CGRect)frame accessToken:(NSString *)accessToken styleURL:(NSURL *)styleURL __attribute__((unavailable("Use -initWithFrame:styleURL:. Set MGLMapboxAccessToken in the Info.plist or call +[MGLAccountManager setAccessToken:].")));
#pragma mark - Authorizing Access
/** @name Authorizing Access */
/** Mapbox API access token for the map view. */
-@property (nonatomic) NSString *accessToken;
+@property (nonatomic) NSString *accessToken __attribute__((unavailable("Use +[MGLAccountManager accessToken] and +[MGLAccountManager setAccessToken:].")));
#pragma mark - Managing Constraints