summaryrefslogtreecommitdiff
path: root/platform/darwin/src/MGLStyleLayer.h.ejs
diff options
context:
space:
mode:
Diffstat (limited to 'platform/darwin/src/MGLStyleLayer.h.ejs')
-rw-r--r--platform/darwin/src/MGLStyleLayer.h.ejs26
1 files changed, 26 insertions, 0 deletions
diff --git a/platform/darwin/src/MGLStyleLayer.h.ejs b/platform/darwin/src/MGLStyleLayer.h.ejs
index e6c60a76db..a91cde672e 100644
--- a/platform/darwin/src/MGLStyleLayer.h.ejs
+++ b/platform/darwin/src/MGLStyleLayer.h.ejs
@@ -84,7 +84,33 @@ MGL_EXPORT
%>StyleLayer
<% if (type === 'background') { -%>
+/**
+Returns a <%- type %> style layer initialized with an identifier.
+
+After initializing and configuring the style layer, add it to a map view’s
+style using the `-[MGLStyle addLayer:]` or
+`-[MGLStyle insertLayer:belowLayer:]` method.
+
+@param identifier A string that uniquely identifies the source in the style to
+which it is added.
+*/
- (instancetype)initWithIdentifier:(NSString *)identifier NS_DESIGNATED_INITIALIZER;
+<% } else { -%>
+
+/**
+ Returns a <%- type %> style layer initialized with an identifier and source.
+
+ After initializing and configuring the style layer, add it to a map view’s
+ style using the `-[MGLStyle addLayer:]` or
+ `-[MGLStyle insertLayer:belowLayer:]` method.
+
+ @param identifier A string that uniquely identifies the source in the style to
+ which it is added.
+ @param source The source from which to obtain the data to style. If the source
+ has not yet been added to the current style, the behavior is undefined.
+ @return An initialized foreground style layer.
+ */
+- (instancetype)initWithIdentifier:(NSString *)identifier source:(MGLSource *)source NS_DESIGNATED_INITIALIZER;
<% } -%>
<% if (layoutProperties.length) { -%>