// 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 "MGLSymbolStyleLayer.h" #include @interface MGLSymbolStyleLayer () @property (nonatomic) mbgl::style::SymbolLayer *layer; @property (nonatomic, readwrite) NSString *layerIdentifier; @property (nonatomic, readwrite) NSString *sourceIdentifier; @end @implementation MGLSymbolStyleLayer @synthesize mapView; - (instancetype)initWithLayerIdentifier:(NSString *)layerIdentifier sourceIdentifier:(NSString *)sourceIdentifier { if (self = [super init]) { _layerIdentifier = layerIdentifier; _sourceIdentifier = sourceIdentifier; _layer = new mbgl::style::SymbolLayer(layerIdentifier.UTF8String, sourceIdentifier.UTF8String); } return self; } #pragma mark - Accessing the Layout Attributes - (void)setSymbolPlacement:(id )symbolPlacement { MGLSetEnumProperty(symbolPlacement, SymbolPlacement, SymbolPlacementType, MGLSymbolStyleLayerSymbolPlacement); [self update]; } - (id )symbolPlacement { MGLGetEnumProperty(SymbolPlacement, SymbolPlacementType, MGLSymbolStyleLayerSymbolPlacement); } - (void)setSymbolSpacing:(id )symbolSpacing { self.layer->setSymbolSpacing(symbolSpacing.mbgl_floatPropertyValue); [self update]; } - (id )symbolSpacing { return [MGLStyleAttribute mbgl_numberPropertyValueWith:self.layer->getSymbolSpacing()]; } - (void)setSymbolAvoidEdges:(id )symbolAvoidEdges { self.layer->setSymbolAvoidEdges(symbolAvoidEdges.mbgl_boolPropertyValue); [self update]; } - (id )symbolAvoidEdges { return [MGLStyleAttribute mbgl_boolPropertyValueWith:self.layer->getSymbolAvoidEdges()]; } - (void)setIconAllowOverlap:(id )iconAllowOverlap { self.layer->setIconAllowOverlap(iconAllowOverlap.mbgl_boolPropertyValue); [self update]; } - (id )iconAllowOverlap { return [MGLStyleAttribute mbgl_boolPropertyValueWith:self.layer->getIconAllowOverlap()]; } - (void)setIconIgnorePlacement:(id )iconIgnorePlacement { self.layer->setIconIgnorePlacement(iconIgnorePlacement.mbgl_boolPropertyValue); [self update]; } - (id )iconIgnorePlacement { return [MGLStyleAttribute mbgl_boolPropertyValueWith:self.layer->getIconIgnorePlacement()]; } - (void)setIconOptional:(id )iconOptional { self.layer->setIconOptional(iconOptional.mbgl_boolPropertyValue); [self update]; } - (id )iconOptional { return [MGLStyleAttribute mbgl_boolPropertyValueWith:self.layer->getIconOptional()]; } - (void)setIconRotationAlignment:(id )iconRotationAlignment { MGLSetEnumProperty(iconRotationAlignment, IconRotationAlignment, AlignmentType, MGLSymbolStyleLayerIconRotationAlignment); [self update]; } - (id )iconRotationAlignment { MGLGetEnumProperty(IconRotationAlignment, AlignmentType, MGLSymbolStyleLayerIconRotationAlignment); } - (void)setIconSize:(id )iconSize { self.layer->setIconSize(iconSize.mbgl_floatPropertyValue); [self update]; } - (id )iconSize { return [MGLStyleAttribute mbgl_numberPropertyValueWith:self.layer->getIconSize()]; } - (void)setIconTextFit:(id )iconTextFit { MGLSetEnumProperty(iconTextFit, IconTextFit, IconTextFitType, MGLSymbolStyleLayerIconTextFit); [self update]; } - (id )iconTextFit { MGLGetEnumProperty(IconTextFit, IconTextFitType, MGLSymbolStyleLayerIconTextFit); } - (void)setIconTextFitPadding:(id )iconTextFitPadding { self.layer->setIconTextFitPadding(iconTextFitPadding.mbgl_paddingPropertyValue); [self update]; } - (id )iconTextFitPadding { return [MGLStyleAttribute mbgl_paddingPropertyValueWith:self.layer->getIconTextFitPadding()]; } - (void)setIconImage:(id )iconImage { self.layer->setIconImage(iconImage.mbgl_stringPropertyValue); [self update]; } - (id )iconImage { return [MGLStyleAttribute mbgl_stringPropertyValueWith:self.layer->getIconImage()]; } - (void)setIconRotate:(id )iconRotate { self.layer->setIconRotate(iconRotate.mbgl_floatPropertyValue); [self update]; } - (id )iconRotate { return [MGLStyleAttribute mbgl_numberPropertyValueWith:self.layer->getIconRotate()]; } - (void)setIconPadding:(id )iconPadding { self.layer->setIconPadding(iconPadding.mbgl_floatPropertyValue); [self update]; } - (id )iconPadding { return [MGLStyleAttribute mbgl_numberPropertyValueWith:self.layer->getIconPadding()]; } - (void)setIconKeepUpright:(id )iconKeepUpright { self.layer->setIconKeepUpright(iconKeepUpright.mbgl_boolPropertyValue); [self update]; } - (id )iconKeepUpright { return [MGLStyleAttribute mbgl_boolPropertyValueWith:self.layer->getIconKeepUpright()]; } - (void)setIconOffset:(id )iconOffset { self.layer->setIconOffset(iconOffset.mbgl_offsetPropertyValue); [self update]; } - (id )iconOffset { return [MGLStyleAttribute mbgl_offsetPropertyValueWith:self.layer->getIconOffset()]; } - (void)setTextPitchAlignment:(id )textPitchAlignment { MGLSetEnumProperty(textPitchAlignment, TextPitchAlignment, AlignmentType, MGLSymbolStyleLayerTextPitchAlignment); [self update]; } - (id )textPitchAlignment { MGLGetEnumProperty(TextPitchAlignment, AlignmentType, MGLSymbolStyleLayerTextPitchAlignment); } - (void)setTextRotationAlignment:(id )textRotationAlignment { MGLSetEnumProperty(textRotationAlignment, TextRotationAlignment, AlignmentType, MGLSymbolStyleLayerTextRotationAlignment); [self update]; } - (id )textRotationAlignment { MGLGetEnumProperty(TextRotationAlignment, AlignmentType, MGLSymbolStyleLayerTextRotationAlignment); } - (void)setTextField:(id )textField { self.layer->setTextField(textField.mbgl_stringPropertyValue); [self update]; } - (id )textField { return [MGLStyleAttribute mbgl_stringPropertyValueWith:self.layer->getTextField()]; } - (void)setTextFont:(id )textFont { self.layer->setTextFont(textFont.mbgl_stringArrayPropertyValue); [self update]; } - (id )textFont { return [MGLStyleAttribute mbgl_stringArrayPropertyValueWith:self.layer->getTextFont()]; } - (void)setTextSize:(id )textSize { self.layer->setTextSize(textSize.mbgl_floatPropertyValue); [self update]; } - (id )textSize { return [MGLStyleAttribute mbgl_numberPropertyValueWith:self.layer->getTextSize()]; } - (void)setTextMaxWidth:(id )textMaxWidth { self.layer->setTextMaxWidth(textMaxWidth.mbgl_floatPropertyValue); [self update]; } - (id )textMaxWidth { return [MGLStyleAttribute mbgl_numberPropertyValueWith:self.layer->getTextMaxWidth()]; } - (void)setTextLineHeight:(id )textLineHeight { self.layer->setTextLineHeight(textLineHeight.mbgl_floatPropertyValue); [self update]; } - (id )textLineHeight { return [MGLStyleAttribute mbgl_numberPropertyValueWith:self.layer->getTextLineHeight()]; } - (void)setTextLetterSpacing:(id )textLetterSpacing { self.layer->setTextLetterSpacing(textLetterSpacing.mbgl_floatPropertyValue); [self update]; } - (id )textLetterSpacing { return [MGLStyleAttribute mbgl_numberPropertyValueWith:self.layer->getTextLetterSpacing()]; } - (void)setTextJustify:(id )textJustify { MGLSetEnumProperty(textJustify, TextJustify, TextJustifyType, MGLSymbolStyleLayerTextJustify); [self update]; } - (id )textJustify { MGLGetEnumProperty(TextJustify, TextJustifyType, MGLSymbolStyleLayerTextJustify); } - (void)setTextAnchor:(id )textAnchor { MGLSetEnumProperty(textAnchor, TextAnchor, TextAnchorType, MGLSymbolStyleLayerTextAnchor); [self update]; } - (id )textAnchor { MGLGetEnumProperty(TextAnchor, TextAnchorType, MGLSymbolStyleLayerTextAnchor); } - (void)setTextMaxAngle:(id )textMaxAngle { self.layer->setTextMaxAngle(textMaxAngle.mbgl_floatPropertyValue); [self update]; } - (id )textMaxAngle { return [MGLStyleAttribute mbgl_numberPropertyValueWith:self.layer->getTextMaxAngle()]; } - (void)setTextRotate:(id )textRotate { self.layer->setTextRotate(textRotate.mbgl_floatPropertyValue); [self update]; } - (id )textRotate { return [MGLStyleAttribute mbgl_numberPropertyValueWith:self.layer->getTextRotate()]; } - (void)setTextPadding:(id )textPadding { self.layer->setTextPadding(textPadding.mbgl_floatPropertyValue); [self update]; } - (id )textPadding { return [MGLStyleAttribute mbgl_numberPropertyValueWith:self.layer->getTextPadding()]; } - (void)setTextKeepUpright:(id )textKeepUpright { self.layer->setTextKeepUpright(textKeepUpright.mbgl_boolPropertyValue); [self update]; } - (id )textKeepUpright { return [MGLStyleAttribute mbgl_boolPropertyValueWith:self.layer->getTextKeepUpright()]; } - (void)setTextTransform:(id )textTransform { MGLSetEnumProperty(textTransform, TextTransform, TextTransformType, MGLSymbolStyleLayerTextTransform); [self update]; } - (id )textTransform { MGLGetEnumProperty(TextTransform, TextTransformType, MGLSymbolStyleLayerTextTransform); } - (void)setTextOffset:(id )textOffset { self.layer->setTextOffset(textOffset.mbgl_offsetPropertyValue); [self update]; } - (id )textOffset { return [MGLStyleAttribute mbgl_offsetPropertyValueWith:self.layer->getTextOffset()]; } - (void)setTextAllowOverlap:(id )textAllowOverlap { self.layer->setTextAllowOverlap(textAllowOverlap.mbgl_boolPropertyValue); [self update]; } - (id )textAllowOverlap { return [MGLStyleAttribute mbgl_boolPropertyValueWith:self.layer->getTextAllowOverlap()]; } - (void)setTextIgnorePlacement:(id )textIgnorePlacement { self.layer->setTextIgnorePlacement(textIgnorePlacement.mbgl_boolPropertyValue); [self update]; } - (id )textIgnorePlacement { return [MGLStyleAttribute mbgl_boolPropertyValueWith:self.layer->getTextIgnorePlacement()]; } - (void)setTextOptional:(id )textOptional { self.layer->setTextOptional(textOptional.mbgl_boolPropertyValue); [self update]; } - (id )textOptional { return [MGLStyleAttribute mbgl_boolPropertyValueWith:self.layer->getTextOptional()]; } #pragma mark - Accessing the Paint Attributes - (void)setIconOpacity:(id )iconOpacity { self.layer->setIconOpacity(iconOpacity.mbgl_floatPropertyValue); [self update]; } - (id )iconOpacity { return [MGLStyleAttribute mbgl_numberPropertyValueWith:self.layer->getIconOpacity()]; } - (void)setIconColor:(id )iconColor { self.layer->setIconColor(iconColor.mbgl_colorPropertyValue); [self update]; } - (id )iconColor { return [MGLStyleAttribute mbgl_colorPropertyValueWith:self.layer->getIconColor()]; } - (void)setIconHaloColor:(id )iconHaloColor { self.layer->setIconHaloColor(iconHaloColor.mbgl_colorPropertyValue); [self update]; } - (id )iconHaloColor { return [MGLStyleAttribute mbgl_colorPropertyValueWith:self.layer->getIconHaloColor()]; } - (void)setIconHaloWidth:(id )iconHaloWidth { self.layer->setIconHaloWidth(iconHaloWidth.mbgl_floatPropertyValue); [self update]; } - (id )iconHaloWidth { return [MGLStyleAttribute mbgl_numberPropertyValueWith:self.layer->getIconHaloWidth()]; } - (void)setIconHaloBlur:(id )iconHaloBlur { self.layer->setIconHaloBlur(iconHaloBlur.mbgl_floatPropertyValue); [self update]; } - (id )iconHaloBlur { return [MGLStyleAttribute mbgl_numberPropertyValueWith:self.layer->getIconHaloBlur()]; } - (void)setIconTranslate:(id )iconTranslate { self.layer->setIconTranslate(iconTranslate.mbgl_offsetPropertyValue); [self update]; } - (id )iconTranslate { return [MGLStyleAttribute mbgl_offsetPropertyValueWith:self.layer->getIconTranslate()]; } - (void)setIconTranslateAnchor:(id )iconTranslateAnchor { MGLSetEnumProperty(iconTranslateAnchor, IconTranslateAnchor, TranslateAnchorType, MGLSymbolStyleLayerIconTranslateAnchor); [self update]; } - (id )iconTranslateAnchor { MGLGetEnumProperty(IconTranslateAnchor, TranslateAnchorType, MGLSymbolStyleLayerIconTranslateAnchor); } - (void)setTextOpacity:(id )textOpacity { self.layer->setTextOpacity(textOpacity.mbgl_floatPropertyValue); [self update]; } - (id )textOpacity { return [MGLStyleAttribute mbgl_numberPropertyValueWith:self.layer->getTextOpacity()]; } - (void)setTextColor:(id )textColor { self.layer->setTextColor(textColor.mbgl_colorPropertyValue); [self update]; } - (id )textColor { return [MGLStyleAttribute mbgl_colorPropertyValueWith:self.layer->getTextColor()]; } - (void)setTextHaloColor:(id )textHaloColor { self.layer->setTextHaloColor(textHaloColor.mbgl_colorPropertyValue); [self update]; } - (id )textHaloColor { return [MGLStyleAttribute mbgl_colorPropertyValueWith:self.layer->getTextHaloColor()]; } - (void)setTextHaloWidth:(id )textHaloWidth { self.layer->setTextHaloWidth(textHaloWidth.mbgl_floatPropertyValue); [self update]; } - (id )textHaloWidth { return [MGLStyleAttribute mbgl_numberPropertyValueWith:self.layer->getTextHaloWidth()]; } - (void)setTextHaloBlur:(id )textHaloBlur { self.layer->setTextHaloBlur(textHaloBlur.mbgl_floatPropertyValue); [self update]; } - (id )textHaloBlur { return [MGLStyleAttribute mbgl_numberPropertyValueWith:self.layer->getTextHaloBlur()]; } - (void)setTextTranslate:(id )textTranslate { self.layer->setTextTranslate(textTranslate.mbgl_offsetPropertyValue); [self update]; } - (id )textTranslate { return [MGLStyleAttribute mbgl_offsetPropertyValueWith:self.layer->getTextTranslate()]; } - (void)setTextTranslateAnchor:(id )textTranslateAnchor { MGLSetEnumProperty(textTranslateAnchor, TextTranslateAnchor, TranslateAnchorType, MGLSymbolStyleLayerTextTranslateAnchor); [self update]; } - (id )textTranslateAnchor { MGLGetEnumProperty(TextTranslateAnchor, TranslateAnchorType, MGLSymbolStyleLayerTextTranslateAnchor); } @end