66 lines
1.9 KiB
Plaintext
66 lines
1.9 KiB
Plaintext
<%
|
|
const type = locals.type;
|
|
const layoutProperties = locals.layoutProperties;
|
|
const paintProperties = locals.paintProperties;
|
|
-%>
|
|
// This file is generated.
|
|
// Edit platform/darwin/scripts/generate-style-code.js, then run `make style-code-darwin`.
|
|
|
|
#import "MGLBaseStyleLayer_Private.h"
|
|
#import "MGLStyleLayer_Private.h"
|
|
#import "MGLStyleAttributeValue.h"
|
|
#import "MGL<%- camelize(type) %>StyleLayer.h"
|
|
|
|
#include <mbgl/style/layers/<%- type %>_layer.hpp>
|
|
|
|
@interface MGL<%- camelize(type) %>StyleLayer ()
|
|
|
|
@property (nonatomic) mbgl::style::<%- camelize(type) %>Layer *layer;
|
|
@property (nonatomic, readwrite) NSString *layerIdentifier;
|
|
@property (nonatomic, readwrite) NSString *sourceIdentifier;
|
|
|
|
@end
|
|
|
|
@implementation MGL<%- camelize(type) %>StyleLayer
|
|
|
|
@synthesize mapView;
|
|
|
|
- (instancetype)initWithLayerIdentifier:(NSString *)layerIdentifier sourceIdentifier:(NSString *)sourceIdentifier {
|
|
if (self = [super init]) {
|
|
_layerIdentifier = layerIdentifier;
|
|
_sourceIdentifier = sourceIdentifier;
|
|
<%- initLayer(type) %>
|
|
}
|
|
return self;
|
|
}
|
|
|
|
<% if (layoutProperties.length) { -%>
|
|
#pragma mark - Accessing the Layout Attributes
|
|
|
|
<% for (const property of layoutProperties) { -%>
|
|
- (void)set<%- camelize(property.name) %>:(<%- propertyType(property, true, type) %>)<%- objCName(property) %> {
|
|
<%- setterImplementation(property, type) %>
|
|
}
|
|
|
|
- (<%- propertyType(property, false, type) %>)<%- objCName(property) %> {
|
|
<%- getterImplementation(property, type) %>
|
|
}
|
|
|
|
<% } -%>
|
|
<% } -%>
|
|
<% if (paintProperties.length) { -%>
|
|
#pragma mark - Accessing the Paint Attributes
|
|
|
|
<% for (const property of paintProperties) { -%>
|
|
- (void)set<%- camelize(property.name) %>:(<%- propertyType(property, true, type) %>)<%- objCName(property) %> {
|
|
<%- setterImplementation(property, type) %>
|
|
}
|
|
|
|
- (<%- propertyType(property, false, type) %>)<%- objCName(property) %> {
|
|
<%- getterImplementation(property, type) %>
|
|
}
|
|
|
|
<% } -%>
|
|
<% } -%>
|
|
@end
|