Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Commit

Permalink
fixes #6467: document style layer classes
Browse files Browse the repository at this point in the history
  • Loading branch information
incanus committed Sep 27, 2016
1 parent e15ba48 commit 44f30c7
Show file tree
Hide file tree
Showing 7 changed files with 52 additions and 6 deletions.
6 changes: 6 additions & 0 deletions platform/darwin/src/MGLBackgroundStyleLayer.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 <MGLStyleLayer>

- (instancetype)initWithLayerIdentifier:(NSString *)layerIdentifier;
Expand Down
7 changes: 6 additions & 1 deletion platform/darwin/src/MGLCircleStyleLayer.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 <MGLStyleLayer>


- (instancetype)initWithLayerIdentifier:(NSString *)layerIdentifier source:(MGLSource *)source;

- (instancetype)initWithLayerIdentifier:(NSString *)layerIdentifier source:(MGLSource *)source sourceLayer:(NSString *)sourceLayer;
Expand Down
7 changes: 6 additions & 1 deletion platform/darwin/src/MGLFillStyleLayer.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 <MGLStyleLayer>


- (instancetype)initWithLayerIdentifier:(NSString *)layerIdentifier source:(MGLSource *)source;

- (instancetype)initWithLayerIdentifier:(NSString *)layerIdentifier source:(MGLSource *)source sourceLayer:(NSString *)sourceLayer;
Expand Down
7 changes: 6 additions & 1 deletion platform/darwin/src/MGLLineStyleLayer.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 <MGLStyleLayer>


- (instancetype)initWithLayerIdentifier:(NSString *)layerIdentifier source:(MGLSource *)source;

- (instancetype)initWithLayerIdentifier:(NSString *)layerIdentifier source:(MGLSource *)source sourceLayer:(NSString *)sourceLayer;
Expand Down
7 changes: 6 additions & 1 deletion platform/darwin/src/MGLRasterStyleLayer.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 <MGLStyleLayer>


- (instancetype)initWithLayerIdentifier:(NSString *)layerIdentifier source:(MGLSource *)source;


Expand Down
17 changes: 16 additions & 1 deletion platform/darwin/src/MGLStyleLayer.h.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -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 <MGLStyleLayer>

<% if (type == 'background') { -%>
- (instancetype)initWithLayerIdentifier:(NSString *)layerIdentifier;
<% } -%>

Expand Down
7 changes: 6 additions & 1 deletion platform/darwin/src/MGLSymbolStyleLayer.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 <MGLStyleLayer>


- (instancetype)initWithLayerIdentifier:(NSString *)layerIdentifier source:(MGLSource *)source;

- (instancetype)initWithLayerIdentifier:(NSString *)layerIdentifier source:(MGLSource *)source sourceLayer:(NSString *)sourceLayer;
Expand Down

0 comments on commit 44f30c7

Please sign in to comment.