// 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 "MGLLineStyleLayer.h" #include @interface MGLLineStyleLayer () @property (nonatomic) mbgl::style::LineLayer *layer; @property (nonatomic, readwrite) NSString *layerIdentifier; @property (nonatomic, readwrite) NSString *sourceIdentifier; @end @implementation MGLLineStyleLayer @synthesize mapView; - (instancetype)initWithLayerIdentifier:(NSString *)layerIdentifier sourceIdentifier:(NSString *)sourceIdentifier { if (self = [super init]) { _layerIdentifier = layerIdentifier; _sourceIdentifier = sourceIdentifier; _layer = new mbgl::style::LineLayer(layerIdentifier.UTF8String, sourceIdentifier.UTF8String); } return self; } #pragma mark - Accessing the Layout Attributes - (void)setLineCap:(id )lineCap { MGLSetEnumProperty(lineCap, LineCap, LineCapType, MGLLineStyleLayerLineCap); [self update]; } - (id )lineCap { MGLGetEnumProperty(LineCap, LineCapType, MGLLineStyleLayerLineCap); } - (void)setLineJoin:(id )lineJoin { MGLSetEnumProperty(lineJoin, LineJoin, LineJoinType, MGLLineStyleLayerLineJoin); [self update]; } - (id )lineJoin { MGLGetEnumProperty(LineJoin, LineJoinType, MGLLineStyleLayerLineJoin); } - (void)setLineMiterLimit:(id )lineMiterLimit { self.layer->setLineMiterLimit(lineMiterLimit.mbgl_floatPropertyValue); [self update]; } - (id )lineMiterLimit { return [MGLStyleAttribute mbgl_numberPropertyValueWith:self.layer->getLineMiterLimit()]; } - (void)setLineRoundLimit:(id )lineRoundLimit { self.layer->setLineRoundLimit(lineRoundLimit.mbgl_floatPropertyValue); [self update]; } - (id )lineRoundLimit { return [MGLStyleAttribute mbgl_numberPropertyValueWith:self.layer->getLineRoundLimit()]; } #pragma mark - Accessing the Paint Attributes - (void)setLineOpacity:(id )lineOpacity { self.layer->setLineOpacity(lineOpacity.mbgl_floatPropertyValue); [self update]; } - (id )lineOpacity { return [MGLStyleAttribute mbgl_numberPropertyValueWith:self.layer->getLineOpacity()]; } - (void)setLineColor:(id )lineColor { self.layer->setLineColor(lineColor.mbgl_colorPropertyValue); [self update]; } - (id )lineColor { return [MGLStyleAttribute mbgl_colorPropertyValueWith:self.layer->getLineColor()]; } - (void)setLineTranslate:(id )lineTranslate { self.layer->setLineTranslate(lineTranslate.mbgl_offsetPropertyValue); [self update]; } - (id )lineTranslate { return [MGLStyleAttribute mbgl_offsetPropertyValueWith:self.layer->getLineTranslate()]; } - (void)setLineTranslateAnchor:(id )lineTranslateAnchor { MGLSetEnumProperty(lineTranslateAnchor, LineTranslateAnchor, TranslateAnchorType, MGLLineStyleLayerLineTranslateAnchor); [self update]; } - (id )lineTranslateAnchor { MGLGetEnumProperty(LineTranslateAnchor, TranslateAnchorType, MGLLineStyleLayerLineTranslateAnchor); } - (void)setLineWidth:(id )lineWidth { self.layer->setLineWidth(lineWidth.mbgl_floatPropertyValue); [self update]; } - (id )lineWidth { return [MGLStyleAttribute mbgl_numberPropertyValueWith:self.layer->getLineWidth()]; } - (void)setLineGapWidth:(id )lineGapWidth { self.layer->setLineGapWidth(lineGapWidth.mbgl_floatPropertyValue); [self update]; } - (id )lineGapWidth { return [MGLStyleAttribute mbgl_numberPropertyValueWith:self.layer->getLineGapWidth()]; } - (void)setLineOffset:(id )lineOffset { self.layer->setLineOffset(lineOffset.mbgl_floatPropertyValue); [self update]; } - (id )lineOffset { return [MGLStyleAttribute mbgl_numberPropertyValueWith:self.layer->getLineOffset()]; } - (void)setLineBlur:(id )lineBlur { self.layer->setLineBlur(lineBlur.mbgl_floatPropertyValue); [self update]; } - (id )lineBlur { return [MGLStyleAttribute mbgl_numberPropertyValueWith:self.layer->getLineBlur()]; } - (void)setLineDasharray:(id )lineDasharray { self.layer->setLineDasharray(lineDasharray.mbgl_numberArrayPropertyValue); [self update]; } - (id )lineDasharray { return [MGLStyleAttribute mbgl_numberArrayPropertyValueWith:self.layer->getLineDasharray()]; } - (void)setLinePattern:(id )linePattern { self.layer->setLinePattern(linePattern.mbgl_stringPropertyValue); [self update]; } - (id )linePattern { return [MGLStyleAttribute mbgl_stringPropertyValueWith:self.layer->getLinePattern()]; } @end