// This file is generated. // Edit platform/darwin/scripts/generate-style-code.js, then run `make style-code-darwin`. #import "MGLBaseStyleLayer_Private.hpp" #import "MGLStyleLayer_Private.hpp" #import "MGLStyleAttributeValue.h" #import "MGLBackgroundStyleLayer.h" #include @interface MGLBackgroundStyleLayer () @property (nonatomic) mbgl::style::BackgroundLayer *layer; @property (nonatomic, readwrite) NSString *layerIdentifier; @property (nonatomic, readwrite) NSString *sourceIdentifier; @end @implementation MGLBackgroundStyleLayer @synthesize mapView; - (instancetype)initWithLayerIdentifier:(NSString *)layerIdentifier sourceIdentifier:(NSString *)sourceIdentifier { if (self = [super init]) { _layerIdentifier = layerIdentifier; _sourceIdentifier = sourceIdentifier; _layer = new mbgl::style::BackgroundLayer(layerIdentifier.UTF8String); } return self; } #pragma mark - Accessing the Paint Attributes - (void)setBackgroundColor:(id )backgroundColor { self.layer->setBackgroundColor(backgroundColor.mbgl_colorPropertyValue); [self update]; } - (id )backgroundColor { return [MGLStyleAttribute mbgl_colorPropertyValueWith:self.layer->getBackgroundColor()]; } - (void)setBackgroundPattern:(id )backgroundPattern { self.layer->setBackgroundPattern(backgroundPattern.mbgl_stringPropertyValue); [self update]; } - (id )backgroundPattern { return [MGLStyleAttribute mbgl_stringPropertyValueWith:self.layer->getBackgroundPattern()]; } - (void)setBackgroundOpacity:(id )backgroundOpacity { self.layer->setBackgroundOpacity(backgroundOpacity.mbgl_floatPropertyValue); [self update]; } - (id )backgroundOpacity { return [MGLStyleAttribute mbgl_numberPropertyValueWith:self.layer->getBackgroundOpacity()]; } @end