summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMinh Nguyễn <mxn@1ec5.org>2015-03-31 15:48:01 -0700
committerMinh Nguyễn <mxn@1ec5.org>2015-04-03 12:14:51 -0700
commite18e4b0de5f601cdfb07eed209e64f88a114e492 (patch)
treeecc4462e4b0c6e1d5c8fa56bc87fa0573fd73ae5 /include
parent6a1e7d5707762561e4947e90f94c1ede9e2940cc (diff)
downloadqtlocation-mapboxgl-e18e4b0de5f601cdfb07eed209e64f88a114e492.tar.gz
Removed redundant initializers and setters
This change removes most of the ways you used to be able to apply a style to the map. Building on #1163, `styleURL` (HTTP(S), mapbox:, asset:) is the canonical way to apply a style, and `mapID` is a convenient shorthand for Mapbox-hosted styles. A relative style URL is interpreted as a path relative to the app’s main bundle. We now construct asset: URLs in lieu of “bundled style names”.
Diffstat (limited to 'include')
-rw-r--r--include/mbgl/ios/MGLMapView.h43
1 files changed, 11 insertions, 32 deletions
diff --git a/include/mbgl/ios/MGLMapView.h b/include/mbgl/ios/MGLMapView.h
index 354e32cc5a..dcf1313a8c 100644
--- a/include/mbgl/ios/MGLMapView.h
+++ b/include/mbgl/ios/MGLMapView.h
@@ -19,20 +19,6 @@
/** @name Initializing a Map View */
-/** 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 accessToken:(NSString *)accessToken bundledStyleNamed:(NSString *)styleName;
-
/** Initialize a map view with a given frame, style URL, and access token.
* @param frame The frame with which to initialize the map view.
* @param accessToken A Mapbox API access token.
@@ -178,26 +164,19 @@
/** @name Styling the Map */
-/** Sets the map style.
-* @param styleJSON The map stylesheet as JSON text. */
-- (void)setStyleJSON:(NSString *)styleJSON;
-
-/** Returns the raw JSON style as a native dictionary object. */
-- (NSDictionary *)getRawStyle;
-
-/** Sets the raw JSON style as a native dictionary object with a transition animation.
-* @param style The style JSON as a dictionary object. */
-- (void)setRawStyle:(NSDictionary *)style;
-
-/** Returns the names of the styles bundled with the library. */
-- (NSArray *)bundledStyleNames;
+/** Mapbox map ID of the style currently displayed in the receiver, or `nil` if the style does not have a map ID.
+
+ The style may lack a map ID if it is located at an HTTP, HTTPS, or asset: URL. Use -styleURL to get the URL in these cases.
+ */
+@property (nonatomic) IBInspectable NSString *mapID;
-/** Sets the map style to a named, bundled style.
-* @param styleName The map style name to use. */
-@property (nonatomic) IBInspectable NSString *styleName;
+/** Returns the URLs to the styles bundled with the library. */
+- (NSArray *)bundledStyleURLs;
-/** Sets the map style URL to use.
-* @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>`). */
+/** URL of the style currently displayed in the receiver.
+
+ The URL may be a full HTTP or HTTPS URL or a Mapbox URL indicating the style’s map ID (`mapbox://<user.style>`). To display the default style, set this property to `nil`.
+ */
@property (nonatomic) NSURL *styleURL;
#pragma mark - Annotating the Map