diff --git a/platform/darwin/src/MGLBackgroundStyleLayer.h b/platform/darwin/src/MGLBackgroundStyleLayer.h index a6eda287837..386b68feda7 100644 --- a/platform/darwin/src/MGLBackgroundStyleLayer.h +++ b/platform/darwin/src/MGLBackgroundStyleLayer.h @@ -6,6 +6,12 @@ NS_ASSUME_NONNULL_BEGIN +/** + A map style's background layer is the bottommost layer and is used to style a color + or pattern to show below all other map features. You can query an `MGLMapView` for its + `style` and obtain the background layer using the `-[MGLStyle layerWithIdentifier:]` + method and passing `background` for the identifier. + */ @interface MGLBackgroundStyleLayer : MGLBaseStyleLayer - (instancetype)initWithLayerIdentifier:(NSString *)layerIdentifier; diff --git a/platform/darwin/src/MGLCircleStyleLayer.h b/platform/darwin/src/MGLCircleStyleLayer.h index 5492b183f45..2cda065b520 100644 --- a/platform/darwin/src/MGLCircleStyleLayer.h +++ b/platform/darwin/src/MGLCircleStyleLayer.h @@ -16,9 +16,14 @@ typedef NS_ENUM(NSUInteger, MGLCircleStyleLayerCirclePitchScale) { MGLCircleStyleLayerCirclePitchScaleViewport, }; +/** + A circle layer which allows customization of styling properties at runtime. You may + instantiate a new circle layer to add to a map style or you may query an + `MGLMapView` for its `style` and obtain existing layers using the + `-[MGLStyle layerWithIdentifier:]` method. + */ @interface MGLCircleStyleLayer : MGLBaseStyleLayer - - (instancetype)initWithLayerIdentifier:(NSString *)layerIdentifier source:(MGLSource *)source; - (instancetype)initWithLayerIdentifier:(NSString *)layerIdentifier source:(MGLSource *)source sourceLayer:(NSString *)sourceLayer; diff --git a/platform/darwin/src/MGLFillStyleLayer.h b/platform/darwin/src/MGLFillStyleLayer.h index 823c0574afe..ab30efff5cf 100644 --- a/platform/darwin/src/MGLFillStyleLayer.h +++ b/platform/darwin/src/MGLFillStyleLayer.h @@ -11,9 +11,14 @@ typedef NS_ENUM(NSUInteger, MGLFillStyleLayerFillTranslateAnchor) { MGLFillStyleLayerFillTranslateAnchorViewport, }; +/** + A fill layer which allows customization of styling properties at runtime. You may + instantiate a new fill layer to add to a map style or you may query an + `MGLMapView` for its `style` and obtain existing layers using the + `-[MGLStyle layerWithIdentifier:]` method. + */ @interface MGLFillStyleLayer : MGLBaseStyleLayer - - (instancetype)initWithLayerIdentifier:(NSString *)layerIdentifier source:(MGLSource *)source; - (instancetype)initWithLayerIdentifier:(NSString *)layerIdentifier source:(MGLSource *)source sourceLayer:(NSString *)sourceLayer; diff --git a/platform/darwin/src/MGLLineStyleLayer.h b/platform/darwin/src/MGLLineStyleLayer.h index ec338f65b63..58c601d53c1 100644 --- a/platform/darwin/src/MGLLineStyleLayer.h +++ b/platform/darwin/src/MGLLineStyleLayer.h @@ -23,9 +23,14 @@ typedef NS_ENUM(NSUInteger, MGLLineStyleLayerLineTranslateAnchor) { MGLLineStyleLayerLineTranslateAnchorViewport, }; +/** + A line layer which allows customization of styling properties at runtime. You may + instantiate a new line layer to add to a map style or you may query an + `MGLMapView` for its `style` and obtain existing layers using the + `-[MGLStyle layerWithIdentifier:]` method. + */ @interface MGLLineStyleLayer : MGLBaseStyleLayer - - (instancetype)initWithLayerIdentifier:(NSString *)layerIdentifier source:(MGLSource *)source; - (instancetype)initWithLayerIdentifier:(NSString *)layerIdentifier source:(MGLSource *)source sourceLayer:(NSString *)sourceLayer; diff --git a/platform/darwin/src/MGLRasterStyleLayer.h b/platform/darwin/src/MGLRasterStyleLayer.h index b7f2cd7fda7..7fdfb04c997 100644 --- a/platform/darwin/src/MGLRasterStyleLayer.h +++ b/platform/darwin/src/MGLRasterStyleLayer.h @@ -6,9 +6,14 @@ NS_ASSUME_NONNULL_BEGIN +/** + A raster layer which allows customization of styling properties at runtime. You may + instantiate a new raster layer to add to a map style or you may query an + `MGLMapView` for its `style` and obtain existing layers using the + `-[MGLStyle layerWithIdentifier:]` method. + */ @interface MGLRasterStyleLayer : MGLBaseStyleLayer - - (instancetype)initWithLayerIdentifier:(NSString *)layerIdentifier source:(MGLSource *)source; diff --git a/platform/darwin/src/MGLStyleLayer.h.ejs b/platform/darwin/src/MGLStyleLayer.h.ejs index 64a7e06b5f4..054adcb32ed 100644 --- a/platform/darwin/src/MGLStyleLayer.h.ejs +++ b/platform/darwin/src/MGLStyleLayer.h.ejs @@ -33,9 +33,24 @@ typedef NS_ENUM(NSUInteger, MGL<%- camelize(type) %>StyleLayer<%- camelize(prope <% } -%> <% } -%> +<% if (type == 'background') { -%> +/** + A map style's background layer is the bottommost layer and is used to style a color + or pattern to show below all other map features. You can query an `MGLMapView` for its + `style` and obtain the background layer using the `-[MGLStyle layerWithIdentifier:]` + method and passing `background` for the identifier. + */ +<% } else { -%> +/** + A <%- type %> layer which allows customization of styling properties at runtime. You may + instantiate a new <%- type %> layer to add to a map style or you may query an + `MGLMapView` for its `style` and obtain existing layers using the + `-[MGLStyle layerWithIdentifier:]` method. + */ +<% } -%> @interface MGL<%- camelize(type) %>StyleLayer : MGLBaseStyleLayer - <% if (type == 'background') { -%> + - (instancetype)initWithLayerIdentifier:(NSString *)layerIdentifier; <% } -%> diff --git a/platform/darwin/src/MGLSymbolStyleLayer.h b/platform/darwin/src/MGLSymbolStyleLayer.h index 6b22b6ccfc6..c501f512e85 100644 --- a/platform/darwin/src/MGLSymbolStyleLayer.h +++ b/platform/darwin/src/MGLSymbolStyleLayer.h @@ -70,9 +70,14 @@ typedef NS_ENUM(NSUInteger, MGLSymbolStyleLayerTextTranslateAnchor) { MGLSymbolStyleLayerTextTranslateAnchorViewport, }; +/** + A symbol layer which allows customization of styling properties at runtime. You may + instantiate a new symbol layer to add to a map style or you may query an + `MGLMapView` for its `style` and obtain existing layers using the + `-[MGLStyle layerWithIdentifier:]` method. + */ @interface MGLSymbolStyleLayer : MGLBaseStyleLayer - - (instancetype)initWithLayerIdentifier:(NSString *)layerIdentifier source:(MGLSource *)source; - (instancetype)initWithLayerIdentifier:(NSString *)layerIdentifier source:(MGLSource *)source sourceLayer:(NSString *)sourceLayer;