summaryrefslogtreecommitdiff
path: root/platform/darwin/src/MGLStyle.h
diff options
context:
space:
mode:
Diffstat (limited to 'platform/darwin/src/MGLStyle.h')
-rw-r--r--platform/darwin/src/MGLStyle.h55
1 files changed, 54 insertions, 1 deletions
diff --git a/platform/darwin/src/MGLStyle.h b/platform/darwin/src/MGLStyle.h
index 8577522b96..368557fc81 100644
--- a/platform/darwin/src/MGLStyle.h
+++ b/platform/darwin/src/MGLStyle.h
@@ -2,6 +2,10 @@
#import "MGLTypes.h"
+#import "MGLStyleLayer.h"
+
+@class MGLSource;
+
NS_ASSUME_NONNULL_BEGIN
/**
@@ -32,6 +36,8 @@ static const NSInteger MGLStyleDefaultVersion = 9;
*/
@interface MGLStyle : NSObject
+#pragma mark Default Style URLs
+
/**
Returns the URL to version 8 of the
<a href="https://www.mapbox.com/maps/streets/">Mapbox Streets</a> style.
@@ -158,7 +164,54 @@ static const NSInteger MGLStyleDefaultVersion = 9;
*/
+ (NSURL *)satelliteStreetsStyleURLWithVersion:(NSInteger)version;
-- (instancetype)init NS_UNAVAILABLE;
+#pragma mark Runtime Styling
+
+/**
+ Returns a layer that conforms to `MGLStyleLayer` if any layer with the given
+ identifier was found.
+
+ @return layer A layer instance of the corresponding type.
+ */
+- (nullable id <MGLStyleLayer>)layerWithIdentifier:(NSString *)identifier;
+
+/**
+ Adds a new layer at the top of the hierarchy.
+
+ @param styleLayer The layer object to add to the map view. This object
+ must conform to the `MGLStyleLayer` protocol.
+ */
+- (void)addLayer:(id <MGLStyleLayer>)styleLayer;
+
+/**
+ Inserts a new layer below another layer.
+
+ @param styleLayer Layer to be inserted.
+ @param belowLayer A layer that's already on the map view.
+ */
+- (void)insertLayer:(id <MGLStyleLayer>)styleLayer
+ belowLayer:(id <MGLStyleLayer>)belowLayer;
+
+/**
+ Removes a layer from the map view.
+
+ @param styleLayer The layer object to remove from the map view. This object
+ must conform to the `MGLStyleLayer` protocol.
+ */
+- (void)removeLayer:(id <MGLStyleLayer>)styleLayer;
+
+/**
+ Adds a new source to the map view.
+
+ @param source The source to add to the map view.
+ */
+- (void)addSource:(MGLSource *)source;
+
+/**
+ Removes a source from the map view.
+
+ @param source The source to remove.
+ */
+- (void)removeSource:(MGLSource *)source;
@end