summaryrefslogtreecommitdiff
path: root/platform/darwin/src/MGLStyle.h
diff options
context:
space:
mode:
authorMinh Nguyễn <mxn@1ec5.org>2016-04-19 21:15:30 -0700
committerMinh Nguyễn <mxn@1ec5.org>2016-05-06 10:57:54 -0700
commit2a4eeadb295775236fe1a89b50f9179b790b127a (patch)
tree8efffe60f9a2cff3abad624dc889b37809bb0194 /platform/darwin/src/MGLStyle.h
parentd28b6f37190dc1c9cbb1e3973f8a4534b507865c (diff)
downloadqtlocation-mapboxgl-2a4eeadb295775236fe1a89b50f9179b790b127a.tar.gz
[core, ios, osx] Version default style URL APIs; deprecated Emerald
Updated default styles from v8 to v9. Deprecated the MGLMapView class methods in favor of new methods that take a version parameter. Deprecated Emerald outright in favor of Outdoors. Replaced usage of the unversioned MGLStyle methods with the corresponding versioned methods and MGLStyleCurrentVersion to ensure consistency. Expanded MGLStyle unit tests to also assert that MGLStyle has the right number of style URL methods and that they’re all public. Linked the OS X SDK unit test bundle to libmbgl-core.a. Removed an unnecessary dependency on osxapp. Replaced Emerald with Outdoors in iosapp and osxapp. Fixes the iOS and OS X side of #4577 and #4702.
Diffstat (limited to 'platform/darwin/src/MGLStyle.h')
-rw-r--r--platform/darwin/src/MGLStyle.h101
1 files changed, 83 insertions, 18 deletions
diff --git a/platform/darwin/src/MGLStyle.h b/platform/darwin/src/MGLStyle.h
index e5b2de877c..2a2d61657f 100644
--- a/platform/darwin/src/MGLStyle.h
+++ b/platform/darwin/src/MGLStyle.h
@@ -4,50 +4,115 @@
NS_ASSUME_NONNULL_BEGIN
-/** A collection of convenience methods for creating style URLs of default styles provided by Mapbox. These instances of NSURL are cached. */
+/**
+ A version number identifying the latest released version of the suite of default styles provided by Mapbox. This version number may be passed into one of the “StyleURLWithVersion” class methods of MGLStyle.
+
+ The value of this constant is current as of the date on which this SDK was published. Consult the <a href="https://www.mapbox.com/api-documentation/#styles">Mapbox Styles API documentation</a> for the most up-to-date style versioning information.
+
+ @warning The value of this constant may change in a future release of the SDK. If you use any feature that depends on a specific implementation detail in a default style, you may use the current value of this constant or the underlying style URL, but do not use the constant itself. Such implementation details may change significantly from version to version.
+ */
+static const NSInteger MGLStyleCurrentVersion = 9;
+
+/**
+ A collection of convenience methods for creating style URLs of default styles provided by Mapbox.
+ */
@interface MGLStyle : NSObject
/**
- Returns the Streets style URL.
+ Returns the URL to the current version of the Streets style.
+
+ Mapbox Streets is a complete base map that balances nature, commerce, and infrastructure.
+ */
++ (NSURL *)streetsStyleURL __attribute__((deprecated("Use -streetsStyleURLWithVersion:.")));
+
+/**
+ Returns the URL to the given version of the Streets style.
+
+ Mapbox Streets is a complete base map that balances nature, commerce, and infrastructure.
+
+ @param version The style’s latest released version. The current version is given by `MGLStyleCurrentVersion`.
+ */
++ (NSURL *)streetsStyleURLWithVersion:(NSInteger)version;
+
+/**
+ Returns the URL to the current version of the Emerald style.
+
+ Mapbox Emerald is a versatile style with emphasis on road networks and public transportation.
+ */
++ (NSURL *)emeraldStyleURL __attribute__((deprecated("Use <mapbox://styles/mapbox/emerald-v8>.")));
+
+/**
+ Returns the URL to the given version of the Outdoors style.
+
+ Mapbox Outdoors is a rugged style that emphasizes physical terrain and outdoor activities.
+
+ @param version The style’s latest released version. The current version is given by `MGLStyleCurrentVersion`.
+ */
++ (NSURL *)outdoorsStyleURLWithVersion:(NSInteger)version;
+
+/**
+ Returns the URL to the current version of the Light style.
- Mapbox Streets is a complete base map, perfect for incorporating your own data.
+ Mapbox Light is a subtle, light-colored backdrop for data visualizations.
*/
-+ (NSURL *)streetsStyleURL;
++ (NSURL *)lightStyleURL __attribute__((deprecated("Use -lightStyleURLWithVersion:.")));
/**
- Returns the Emerald style URL.
+ Returns the URL to the given version of the Light style.
+
+ Mapbox Light is a subtle, light-colored backdrop for data visualizations.
- Emerald is a versatile style with emphasis on road networks and public transportation.
+ @param version The style’s latest released version. The current version is given by `MGLStyleCurrentVersion`.
*/
-+ (NSURL *)emeraldStyleURL;
++ (NSURL *)lightStyleURLWithVersion:(NSInteger)version;
/**
- Returns the Light style URL.
+ Returns the URL to the current version of the Dark style.
- Light is a subtle, light-colored backdrop for data visualizations.
+ Mapbox Dark is a subtle, dark-colored backdrop for data visualizations.
*/
-+ (NSURL *)lightStyleURL;
++ (NSURL *)darkStyleURL __attribute__((deprecated("Use -darkStyleURLWithVersion:.")));
/**
- Returns the Dark style URL.
+ Returns the URL to the given version of the Dark style.
+
+ Mapbox Dark is a subtle, dark-colored backdrop for data visualizations.
- Dark is a subtle, dark-colored backdrop for data visualizations.
+ @param version The style’s latest released version. The current version is given by `MGLStyleCurrentVersion`.
*/
-+ (NSURL *)darkStyleURL;
++ (NSURL *)darkStyleURLWithVersion:(NSInteger)version;
/**
- Returns the Satellite style URL.
+ Returns the URL to the current version of the Satellite style.
Mapbox Satellite is a beautiful global satellite and aerial imagery layer.
*/
-+ (NSURL *)satelliteStyleURL;
++ (NSURL *)satelliteStyleURL __attribute__((deprecated("Use -satelliteStyleURLWithVersion:.")));
/**
- Returns the Hybrid style URL.
+ Returns the URL to the given version of the Satellite style.
+
+ Mapbox Satellite is a beautiful global satellite and aerial imagery layer.
+
+ @param version The style’s latest released version. The current version is given by `MGLStyleCurrentVersion`.
+ */
++ (NSURL *)satelliteStyleURLWithVersion:(NSInteger)version;
+
+/**
+ Returns the URL to the current version of the Hybrid style.
+
+ Mapbox Hybrid combines the global satellite and aerial imagery of Mapbox Satellite with unobtrusive labels.
+ */
++ (NSURL *)hybridStyleURL __attribute__((deprecated("Use -hybridStyleURLWithVersion:.")));
+
+/**
+ Returns the URL to the given version of the Hybrid style.
+
+ Mapbox Hybrid combines the global satellite and aerial imagery of Mapbox Satellite with unobtrusive labels.
- Hybrid combines the global satellite and aerial imagery of Mapbox Satellite with unobtrusive labels.
+ @param version The style’s latest released version. The current version is given by `MGLStyleCurrentVersion`.
*/
-+ (NSURL *)hybridStyleURL;
++ (NSURL *)hybridStyleURLWithVersion:(NSInteger)version;
- (instancetype)init NS_UNAVAILABLE;