summaryrefslogtreecommitdiff
path: root/include/mbgl
diff options
context:
space:
mode:
authorMinh Nguyễn <mxn@1ec5.org>2015-03-17 16:25:06 -0700
committerMinh Nguyễn <mxn@1ec5.org>2015-03-19 10:29:04 -0700
commit3d195b467af2901d0c1a5f2103563dc0a2108c35 (patch)
treef44aa8126703e51e13af22c95e9d8bbd90c179fe /include/mbgl
parent1ce51a17e7de5d6a02346efce1539ff7f36e0a6d (diff)
downloadqtlocation-mapboxgl-3d195b467af2901d0c1a5f2103563dc0a2108c35.tar.gz
Added API for initializing with bundled style
As a best practice for the beta and a workaround for #1014. Also reversed the argument order of the existing init method. Reads better this way, but you’ll likely have to change your initialization to match the new signatures.
Diffstat (limited to 'include/mbgl')
-rw-r--r--include/mbgl/ios/MGLMapView.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/include/mbgl/ios/MGLMapView.h b/include/mbgl/ios/MGLMapView.h
index f954340262..481e878edc 100644
--- a/include/mbgl/ios/MGLMapView.h
+++ b/include/mbgl/ios/MGLMapView.h
@@ -16,10 +16,17 @@
/** Initialize a map view with a given frame, style, and access token.
* @param frame The frame with which to initialize the map view.
+* @param accessToken A Mapbox API access token.
* @param styleJSON The map stylesheet as JSON text.
+* @return An initialized map view, or `nil` if the map view was unable to be initialized. */
+- (instancetype)initWithFrame:(CGRect)frame accessToken:(NSString *)accessToken styleJSON:(NSString *)styleJSON;
+
+/** Initialize a map view with a given frame, bundled style name, and access token.
+* @param frame The frame with which to initialize the map view.
* @param accessToken A Mapbox API access token.
+* @param styleName The map style name to use.
* @return An initialized map view, or `nil` if the map view was unable to be initialized. */
-- (instancetype)initWithFrame:(CGRect)frame styleJSON:(NSString *)styleJSON accessToken:(NSString *)accessToken;
+- (instancetype)initWithFrame:(CGRect)frame accessToken:(NSString *)accessToken bundledStyleNamed:(NSString *)styleName;
/** Initialize a map view with a given frame, the default style, and an access token.
* @param frame The frame with which to initialize the map view.