Files
MapLibreParticleLab/include/mbgl/ios/MGLStyle.h
Minh Nguyễn 557b8afb7c [core][iOS] Source iOS styles from default_styles
Moved mbgl::util::default_styles to a more appropriate location, where iOS platform code can also find it. Moved -[MGLMapView bundledStyleURLs] (which is now deprecated) and the style switcher in iosapp to default_styles.

Added a collection of convenience methods for getting style URLs. It makes little sense to layer an enum atop this, as MapKit does, because MGLMapView styles aren’t limited to this set. A good analogy is UIColor. This also makes for a good entry point for future runtime styling APIs.

Introduced independent constants for each default style, because it’s more common to need access to a particular style than to iterate over them. This fact is apparent in the MGLStyle class, which now uses macros and assertions to ensure that it’s kept up-to-date with changes in default_styles.

/ref #1462
2015-10-30 13:09:37 -07:00

37 lines
1.2 KiB
Objective-C

#import "Mapbox.h"
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. */
@interface MGLStyle : NSObject
/** Returns the Streets style URL.
* Mapbox Streets is a complete base map, perfect for incorporating your own data. */
+ (NSURL *)streetsStyleURL;
/** Returns the Emerald style URL.
* Emerald is a versatile style with emphasis on road networks and public transportation. */
+ (NSURL *)emeraldStyleURL;
/** Returns the Light style URL.
* Light is a subtle, light-colored backdrop for data visualizations. */
+ (NSURL *)lightStyleURL;
/** Returns the Dark style URL.
* Dark is a subtle, dark-colored backdrop for data visualizations. */
+ (NSURL *)darkStyleURL;
/** Returns the Satellite style URL.
* Mapbox Satellite is a beautiful global satellite and aerial imagery layer. */
+ (NSURL *)satelliteStyleURL;
/** Returns the Hybrid style URL.
* Hybrid combines the global satellite and aerial imagery of Mapbox Satellite with unobtrusive labels. */
+ (NSURL *)hybridStyleURL;
- (instancetype)init NS_UNAVAILABLE;
@end
NS_ASSUME_NONNULL_END