// This file is generated. // Edit platform/darwin/scripts/generate-style-code.js, then run `make darwin-style-code`. #import "MGLSource.h" #import "NSPredicate+MGLAdditions.h" #import "NSDate+MGLAdditions.h" #import "MGLStyleLayer_Private.h" #import "MGLStyleValue_Private.h" #import "MGLSymbolStyleLayer.h" #include #include namespace mbgl { MBGL_DEFINE_ENUM(MGLIconPitchAlignment, { { MGLIconPitchAlignmentMap, "map" }, { MGLIconPitchAlignmentViewport, "viewport" }, { MGLIconPitchAlignmentAuto, "auto" }, }); MBGL_DEFINE_ENUM(MGLIconRotationAlignment, { { MGLIconRotationAlignmentMap, "map" }, { MGLIconRotationAlignmentViewport, "viewport" }, { MGLIconRotationAlignmentAuto, "auto" }, }); MBGL_DEFINE_ENUM(MGLIconTextFit, { { MGLIconTextFitNone, "none" }, { MGLIconTextFitWidth, "width" }, { MGLIconTextFitHeight, "height" }, { MGLIconTextFitBoth, "both" }, }); MBGL_DEFINE_ENUM(MGLSymbolPlacement, { { MGLSymbolPlacementPoint, "point" }, { MGLSymbolPlacementLine, "line" }, }); MBGL_DEFINE_ENUM(MGLTextAnchor, { { MGLTextAnchorCenter, "center" }, { MGLTextAnchorLeft, "left" }, { MGLTextAnchorRight, "right" }, { MGLTextAnchorTop, "top" }, { MGLTextAnchorBottom, "bottom" }, { MGLTextAnchorTopLeft, "top-left" }, { MGLTextAnchorTopRight, "top-right" }, { MGLTextAnchorBottomLeft, "bottom-left" }, { MGLTextAnchorBottomRight, "bottom-right" }, }); MBGL_DEFINE_ENUM(MGLTextJustification, { { MGLTextJustificationLeft, "left" }, { MGLTextJustificationCenter, "center" }, { MGLTextJustificationRight, "right" }, }); MBGL_DEFINE_ENUM(MGLTextPitchAlignment, { { MGLTextPitchAlignmentMap, "map" }, { MGLTextPitchAlignmentViewport, "viewport" }, { MGLTextPitchAlignmentAuto, "auto" }, }); MBGL_DEFINE_ENUM(MGLTextRotationAlignment, { { MGLTextRotationAlignmentMap, "map" }, { MGLTextRotationAlignmentViewport, "viewport" }, { MGLTextRotationAlignmentAuto, "auto" }, }); MBGL_DEFINE_ENUM(MGLTextTransform, { { MGLTextTransformNone, "none" }, { MGLTextTransformUppercase, "uppercase" }, { MGLTextTransformLowercase, "lowercase" }, }); MBGL_DEFINE_ENUM(MGLIconTranslationAnchor, { { MGLIconTranslationAnchorMap, "map" }, { MGLIconTranslationAnchorViewport, "viewport" }, }); MBGL_DEFINE_ENUM(MGLTextTranslationAnchor, { { MGLTextTranslationAnchorMap, "map" }, { MGLTextTranslationAnchorViewport, "viewport" }, }); } @interface MGLSymbolStyleLayer () @property (nonatomic, readonly) mbgl::style::SymbolLayer *rawLayer; @end @implementation MGLSymbolStyleLayer - (instancetype)initWithIdentifier:(NSString *)identifier source:(MGLSource *)source { auto layer = std::make_unique(identifier.UTF8String, source.identifier.UTF8String); return self = [super initWithPendingLayer:std::move(layer)]; } - (mbgl::style::SymbolLayer *)rawLayer { return (mbgl::style::SymbolLayer *)super.rawLayer; } - (NSString *)sourceIdentifier { MGLAssertStyleLayerIsValid(); return @(self.rawLayer->getSourceID().c_str()); } - (NSString *)sourceLayerIdentifier { MGLAssertStyleLayerIsValid(); auto layerID = self.rawLayer->getSourceLayer(); return layerID.empty() ? nil : @(layerID.c_str()); } - (void)setSourceLayerIdentifier:(NSString *)sourceLayerIdentifier { MGLAssertStyleLayerIsValid(); self.rawLayer->setSourceLayer(sourceLayerIdentifier.UTF8String ?: ""); } - (void)setPredicate:(NSPredicate *)predicate { MGLAssertStyleLayerIsValid(); self.rawLayer->setFilter(predicate ? predicate.mgl_filter : mbgl::style::NullFilter()); } - (NSPredicate *)predicate { MGLAssertStyleLayerIsValid(); return [NSPredicate mgl_predicateWithFilter:self.rawLayer->getFilter()]; } #pragma mark - Accessing the Layout Attributes - (void)setIconAllowsOverlap:(MGLStyleValue *)iconAllowsOverlap { MGLAssertStyleLayerIsValid(); auto mbglValue = MGLStyleValueTransformer().toPropertyValue(iconAllowsOverlap); self.rawLayer->setIconAllowOverlap(mbglValue); } - (MGLStyleValue *)iconAllowsOverlap { MGLAssertStyleLayerIsValid(); auto propertyValue = self.rawLayer->getIconAllowOverlap(); if (propertyValue.isUndefined()) { return MGLStyleValueTransformer().toStyleValue(self.rawLayer->getDefaultIconAllowOverlap()); } return MGLStyleValueTransformer().toStyleValue(propertyValue); } - (void)setIconAllowOverlap:(MGLStyleValue *)iconAllowOverlap { } - (MGLStyleValue *)iconAllowOverlap { return self.iconAllowsOverlap; } - (void)setIconIgnoresPlacement:(MGLStyleValue *)iconIgnoresPlacement { MGLAssertStyleLayerIsValid(); auto mbglValue = MGLStyleValueTransformer().toPropertyValue(iconIgnoresPlacement); self.rawLayer->setIconIgnorePlacement(mbglValue); } - (MGLStyleValue *)iconIgnoresPlacement { MGLAssertStyleLayerIsValid(); auto propertyValue = self.rawLayer->getIconIgnorePlacement(); if (propertyValue.isUndefined()) { return MGLStyleValueTransformer().toStyleValue(self.rawLayer->getDefaultIconIgnorePlacement()); } return MGLStyleValueTransformer().toStyleValue(propertyValue); } - (void)setIconIgnorePlacement:(MGLStyleValue *)iconIgnorePlacement { } - (MGLStyleValue *)iconIgnorePlacement { return self.iconIgnoresPlacement; } - (void)setIconImageName:(MGLStyleValue *)iconImageName { MGLAssertStyleLayerIsValid(); auto mbglValue = MGLStyleValueTransformer().toDataDrivenPropertyValue(iconImageName); self.rawLayer->setIconImage(mbglValue); } - (MGLStyleValue *)iconImageName { MGLAssertStyleLayerIsValid(); auto propertyValue = self.rawLayer->getIconImage(); if (propertyValue.isUndefined()) { return MGLStyleValueTransformer().toDataDrivenStyleValue(self.rawLayer->getDefaultIconImage()); } return MGLStyleValueTransformer().toDataDrivenStyleValue(propertyValue); } - (void)setIconImage:(MGLStyleValue *)iconImage { } - (MGLStyleValue *)iconImage { return self.iconImageName; } - (void)setIconOffset:(MGLStyleValue *)iconOffset { MGLAssertStyleLayerIsValid(); auto mbglValue = MGLStyleValueTransformer, NSValue *>().toDataDrivenPropertyValue(iconOffset); self.rawLayer->setIconOffset(mbglValue); } - (MGLStyleValue *)iconOffset { MGLAssertStyleLayerIsValid(); auto propertyValue = self.rawLayer->getIconOffset(); if (propertyValue.isUndefined()) { return MGLStyleValueTransformer, NSValue *>().toDataDrivenStyleValue(self.rawLayer->getDefaultIconOffset()); } return MGLStyleValueTransformer, NSValue *>().toDataDrivenStyleValue(propertyValue); } - (void)setIconOptional:(MGLStyleValue *)iconOptional { MGLAssertStyleLayerIsValid(); auto mbglValue = MGLStyleValueTransformer().toPropertyValue(iconOptional); self.rawLayer->setIconOptional(mbglValue); } - (MGLStyleValue *)isIconOptional { MGLAssertStyleLayerIsValid(); auto propertyValue = self.rawLayer->getIconOptional(); if (propertyValue.isUndefined()) { return MGLStyleValueTransformer().toStyleValue(self.rawLayer->getDefaultIconOptional()); } return MGLStyleValueTransformer().toStyleValue(propertyValue); } - (void)setIconPadding:(MGLStyleValue *)iconPadding { MGLAssertStyleLayerIsValid(); auto mbglValue = MGLStyleValueTransformer().toInterpolatablePropertyValue(iconPadding); self.rawLayer->setIconPadding(mbglValue); } - (MGLStyleValue *)iconPadding { MGLAssertStyleLayerIsValid(); auto propertyValue = self.rawLayer->getIconPadding(); if (propertyValue.isUndefined()) { return MGLStyleValueTransformer().toStyleValue(self.rawLayer->getDefaultIconPadding()); } return MGLStyleValueTransformer().toStyleValue(propertyValue); } - (void)setIconPitchAlignment:(MGLStyleValue *)iconPitchAlignment { MGLAssertStyleLayerIsValid(); auto mbglValue = MGLStyleValueTransformer().toEnumPropertyValue(iconPitchAlignment); self.rawLayer->setIconPitchAlignment(mbglValue); } - (MGLStyleValue *)iconPitchAlignment { MGLAssertStyleLayerIsValid(); auto propertyValue = self.rawLayer->getIconPitchAlignment(); if (propertyValue.isUndefined()) { return MGLStyleValueTransformer().toEnumStyleValue(self.rawLayer->getDefaultIconPitchAlignment()); } return MGLStyleValueTransformer().toEnumStyleValue(propertyValue); } - (void)setIconRotation:(MGLStyleValue *)iconRotation { MGLAssertStyleLayerIsValid(); auto mbglValue = MGLStyleValueTransformer().toDataDrivenPropertyValue(iconRotation); self.rawLayer->setIconRotate(mbglValue); } - (MGLStyleValue *)iconRotation { MGLAssertStyleLayerIsValid(); auto propertyValue = self.rawLayer->getIconRotate(); if (propertyValue.isUndefined()) { return MGLStyleValueTransformer().toDataDrivenStyleValue(self.rawLayer->getDefaultIconRotate()); } return MGLStyleValueTransformer().toDataDrivenStyleValue(propertyValue); } - (void)setIconRotate:(MGLStyleValue *)iconRotate { } - (MGLStyleValue *)iconRotate { return self.iconRotation; } - (void)setIconRotationAlignment:(MGLStyleValue *)iconRotationAlignment { MGLAssertStyleLayerIsValid(); auto mbglValue = MGLStyleValueTransformer().toEnumPropertyValue(iconRotationAlignment); self.rawLayer->setIconRotationAlignment(mbglValue); } - (MGLStyleValue *)iconRotationAlignment { MGLAssertStyleLayerIsValid(); auto propertyValue = self.rawLayer->getIconRotationAlignment(); if (propertyValue.isUndefined()) { return MGLStyleValueTransformer().toEnumStyleValue(self.rawLayer->getDefaultIconRotationAlignment()); } return MGLStyleValueTransformer().toEnumStyleValue(propertyValue); } - (void)setIconScale:(MGLStyleValue *)iconScale { MGLAssertStyleLayerIsValid(); auto mbglValue = MGLStyleValueTransformer().toDataDrivenPropertyValue(iconScale); self.rawLayer->setIconSize(mbglValue); } - (MGLStyleValue *)iconScale { MGLAssertStyleLayerIsValid(); auto propertyValue = self.rawLayer->getIconSize(); if (propertyValue.isUndefined()) { return MGLStyleValueTransformer().toDataDrivenStyleValue(self.rawLayer->getDefaultIconSize()); } return MGLStyleValueTransformer().toDataDrivenStyleValue(propertyValue); } - (void)setIconSize:(MGLStyleValue *)iconSize { } - (MGLStyleValue *)iconSize { return self.iconScale; } - (void)setIconTextFit:(MGLStyleValue *)iconTextFit { MGLAssertStyleLayerIsValid(); auto mbglValue = MGLStyleValueTransformer().toEnumPropertyValue(iconTextFit); self.rawLayer->setIconTextFit(mbglValue); } - (MGLStyleValue *)iconTextFit { MGLAssertStyleLayerIsValid(); auto propertyValue = self.rawLayer->getIconTextFit(); if (propertyValue.isUndefined()) { return MGLStyleValueTransformer().toEnumStyleValue(self.rawLayer->getDefaultIconTextFit()); } return MGLStyleValueTransformer().toEnumStyleValue(propertyValue); } - (void)setIconTextFitPadding:(MGLStyleValue *)iconTextFitPadding { MGLAssertStyleLayerIsValid(); auto mbglValue = MGLStyleValueTransformer, NSValue *>().toInterpolatablePropertyValue(iconTextFitPadding); self.rawLayer->setIconTextFitPadding(mbglValue); } - (MGLStyleValue *)iconTextFitPadding { MGLAssertStyleLayerIsValid(); auto propertyValue = self.rawLayer->getIconTextFitPadding(); if (propertyValue.isUndefined()) { return MGLStyleValueTransformer, NSValue *>().toStyleValue(self.rawLayer->getDefaultIconTextFitPadding()); } return MGLStyleValueTransformer, NSValue *>().toStyleValue(propertyValue); } - (void)setKeepsIconUpright:(MGLStyleValue *)keepsIconUpright { MGLAssertStyleLayerIsValid(); auto mbglValue = MGLStyleValueTransformer().toPropertyValue(keepsIconUpright); self.rawLayer->setIconKeepUpright(mbglValue); } - (MGLStyleValue *)keepsIconUpright { MGLAssertStyleLayerIsValid(); auto propertyValue = self.rawLayer->getIconKeepUpright(); if (propertyValue.isUndefined()) { return MGLStyleValueTransformer().toStyleValue(self.rawLayer->getDefaultIconKeepUpright()); } return MGLStyleValueTransformer().toStyleValue(propertyValue); } - (void)setIconKeepUpright:(MGLStyleValue *)iconKeepUpright { } - (MGLStyleValue *)iconKeepUpright { return self.keepsIconUpright; } - (void)setKeepsTextUpright:(MGLStyleValue *)keepsTextUpright { MGLAssertStyleLayerIsValid(); auto mbglValue = MGLStyleValueTransformer().toPropertyValue(keepsTextUpright); self.rawLayer->setTextKeepUpright(mbglValue); } - (MGLStyleValue *)keepsTextUpright { MGLAssertStyleLayerIsValid(); auto propertyValue = self.rawLayer->getTextKeepUpright(); if (propertyValue.isUndefined()) { return MGLStyleValueTransformer().toStyleValue(self.rawLayer->getDefaultTextKeepUpright()); } return MGLStyleValueTransformer().toStyleValue(propertyValue); } - (void)setTextKeepUpright:(MGLStyleValue *)textKeepUpright { } - (MGLStyleValue *)textKeepUpright { return self.keepsTextUpright; } - (void)setMaximumTextAngle:(MGLStyleValue *)maximumTextAngle { MGLAssertStyleLayerIsValid(); auto mbglValue = MGLStyleValueTransformer().toInterpolatablePropertyValue(maximumTextAngle); self.rawLayer->setTextMaxAngle(mbglValue); } - (MGLStyleValue *)maximumTextAngle { MGLAssertStyleLayerIsValid(); auto propertyValue = self.rawLayer->getTextMaxAngle(); if (propertyValue.isUndefined()) { return MGLStyleValueTransformer().toStyleValue(self.rawLayer->getDefaultTextMaxAngle()); } return MGLStyleValueTransformer().toStyleValue(propertyValue); } - (void)setTextMaxAngle:(MGLStyleValue *)textMaxAngle { } - (MGLStyleValue *)textMaxAngle { return self.maximumTextAngle; } - (void)setMaximumTextWidth:(MGLStyleValue *)maximumTextWidth { MGLAssertStyleLayerIsValid(); auto mbglValue = MGLStyleValueTransformer().toInterpolatablePropertyValue(maximumTextWidth); self.rawLayer->setTextMaxWidth(mbglValue); } - (MGLStyleValue *)maximumTextWidth { MGLAssertStyleLayerIsValid(); auto propertyValue = self.rawLayer->getTextMaxWidth(); if (propertyValue.isUndefined()) { return MGLStyleValueTransformer().toStyleValue(self.rawLayer->getDefaultTextMaxWidth()); } return MGLStyleValueTransformer().toStyleValue(propertyValue); } - (void)setTextMaxWidth:(MGLStyleValue *)textMaxWidth { } - (MGLStyleValue *)textMaxWidth { return self.maximumTextWidth; } - (void)setSymbolAvoidsEdges:(MGLStyleValue *)symbolAvoidsEdges { MGLAssertStyleLayerIsValid(); auto mbglValue = MGLStyleValueTransformer().toPropertyValue(symbolAvoidsEdges); self.rawLayer->setSymbolAvoidEdges(mbglValue); } - (MGLStyleValue *)symbolAvoidsEdges { MGLAssertStyleLayerIsValid(); auto propertyValue = self.rawLayer->getSymbolAvoidEdges(); if (propertyValue.isUndefined()) { return MGLStyleValueTransformer().toStyleValue(self.rawLayer->getDefaultSymbolAvoidEdges()); } return MGLStyleValueTransformer().toStyleValue(propertyValue); } - (void)setSymbolAvoidEdges:(MGLStyleValue *)symbolAvoidEdges { } - (MGLStyleValue *)symbolAvoidEdges { return self.symbolAvoidsEdges; } - (void)setSymbolPlacement:(MGLStyleValue *)symbolPlacement { MGLAssertStyleLayerIsValid(); auto mbglValue = MGLStyleValueTransformer().toEnumPropertyValue(symbolPlacement); self.rawLayer->setSymbolPlacement(mbglValue); } - (MGLStyleValue *)symbolPlacement { MGLAssertStyleLayerIsValid(); auto propertyValue = self.rawLayer->getSymbolPlacement(); if (propertyValue.isUndefined()) { return MGLStyleValueTransformer().toEnumStyleValue(self.rawLayer->getDefaultSymbolPlacement()); } return MGLStyleValueTransformer().toEnumStyleValue(propertyValue); } - (void)setSymbolSpacing:(MGLStyleValue *)symbolSpacing { MGLAssertStyleLayerIsValid(); auto mbglValue = MGLStyleValueTransformer().toInterpolatablePropertyValue(symbolSpacing); self.rawLayer->setSymbolSpacing(mbglValue); } - (MGLStyleValue *)symbolSpacing { MGLAssertStyleLayerIsValid(); auto propertyValue = self.rawLayer->getSymbolSpacing(); if (propertyValue.isUndefined()) { return MGLStyleValueTransformer().toStyleValue(self.rawLayer->getDefaultSymbolSpacing()); } return MGLStyleValueTransformer().toStyleValue(propertyValue); } - (void)setText:(MGLStyleValue *)text { MGLAssertStyleLayerIsValid(); auto mbglValue = MGLStyleValueTransformer().toDataDrivenPropertyValue(text); self.rawLayer->setTextField(mbglValue); } - (MGLStyleValue *)text { MGLAssertStyleLayerIsValid(); auto propertyValue = self.rawLayer->getTextField(); if (propertyValue.isUndefined()) { return MGLStyleValueTransformer().toDataDrivenStyleValue(self.rawLayer->getDefaultTextField()); } return MGLStyleValueTransformer().toDataDrivenStyleValue(propertyValue); } - (void)setTextField:(MGLStyleValue *)textField { } - (MGLStyleValue *)textField { return self.text; } - (void)setTextAllowsOverlap:(MGLStyleValue *)textAllowsOverlap { MGLAssertStyleLayerIsValid(); auto mbglValue = MGLStyleValueTransformer().toPropertyValue(textAllowsOverlap); self.rawLayer->setTextAllowOverlap(mbglValue); } - (MGLStyleValue *)textAllowsOverlap { MGLAssertStyleLayerIsValid(); auto propertyValue = self.rawLayer->getTextAllowOverlap(); if (propertyValue.isUndefined()) { return MGLStyleValueTransformer().toStyleValue(self.rawLayer->getDefaultTextAllowOverlap()); } return MGLStyleValueTransformer().toStyleValue(propertyValue); } - (void)setTextAllowOverlap:(MGLStyleValue *)textAllowOverlap { } - (MGLStyleValue *)textAllowOverlap { return self.textAllowsOverlap; } - (void)setTextAnchor:(MGLStyleValue *)textAnchor { MGLAssertStyleLayerIsValid(); auto mbglValue = MGLStyleValueTransformer().toEnumPropertyValue(textAnchor); self.rawLayer->setTextAnchor(mbglValue); } - (MGLStyleValue *)textAnchor { MGLAssertStyleLayerIsValid(); auto propertyValue = self.rawLayer->getTextAnchor(); if (propertyValue.isUndefined()) { return MGLStyleValueTransformer().toEnumStyleValue(self.rawLayer->getDefaultTextAnchor()); } return MGLStyleValueTransformer().toEnumStyleValue(propertyValue); } - (void)setTextFontNames:(MGLStyleValue *> *)textFontNames { MGLAssertStyleLayerIsValid(); auto mbglValue = MGLStyleValueTransformer, NSArray *, std::string>().toPropertyValue(textFontNames); self.rawLayer->setTextFont(mbglValue); } - (MGLStyleValue *> *)textFontNames { MGLAssertStyleLayerIsValid(); auto propertyValue = self.rawLayer->getTextFont(); if (propertyValue.isUndefined()) { return MGLStyleValueTransformer, NSArray *, std::string>().toStyleValue(self.rawLayer->getDefaultTextFont()); } return MGLStyleValueTransformer, NSArray *, std::string>().toStyleValue(propertyValue); } - (void)setTextFont:(MGLStyleValue *> *)textFont { } - (MGLStyleValue *> *)textFont { return self.textFontNames; } - (void)setTextFontSize:(MGLStyleValue *)textFontSize { MGLAssertStyleLayerIsValid(); auto mbglValue = MGLStyleValueTransformer().toDataDrivenPropertyValue(textFontSize); self.rawLayer->setTextSize(mbglValue); } - (MGLStyleValue *)textFontSize { MGLAssertStyleLayerIsValid(); auto propertyValue = self.rawLayer->getTextSize(); if (propertyValue.isUndefined()) { return MGLStyleValueTransformer().toDataDrivenStyleValue(self.rawLayer->getDefaultTextSize()); } return MGLStyleValueTransformer().toDataDrivenStyleValue(propertyValue); } - (void)setTextSize:(MGLStyleValue *)textSize { } - (MGLStyleValue *)textSize { return self.textFontSize; } - (void)setTextIgnoresPlacement:(MGLStyleValue *)textIgnoresPlacement { MGLAssertStyleLayerIsValid(); auto mbglValue = MGLStyleValueTransformer().toPropertyValue(textIgnoresPlacement); self.rawLayer->setTextIgnorePlacement(mbglValue); } - (MGLStyleValue *)textIgnoresPlacement { MGLAssertStyleLayerIsValid(); auto propertyValue = self.rawLayer->getTextIgnorePlacement(); if (propertyValue.isUndefined()) { return MGLStyleValueTransformer().toStyleValue(self.rawLayer->getDefaultTextIgnorePlacement()); } return MGLStyleValueTransformer().toStyleValue(propertyValue); } - (void)setTextIgnorePlacement:(MGLStyleValue *)textIgnorePlacement { } - (MGLStyleValue *)textIgnorePlacement { return self.textIgnoresPlacement; } - (void)setTextJustification:(MGLStyleValue *)textJustification { MGLAssertStyleLayerIsValid(); auto mbglValue = MGLStyleValueTransformer().toEnumPropertyValue(textJustification); self.rawLayer->setTextJustify(mbglValue); } - (MGLStyleValue *)textJustification { MGLAssertStyleLayerIsValid(); auto propertyValue = self.rawLayer->getTextJustify(); if (propertyValue.isUndefined()) { return MGLStyleValueTransformer().toEnumStyleValue(self.rawLayer->getDefaultTextJustify()); } return MGLStyleValueTransformer().toEnumStyleValue(propertyValue); } - (void)setTextJustify:(MGLStyleValue *)textJustify { } - (MGLStyleValue *)textJustify { return self.textJustification; } - (void)setTextLetterSpacing:(MGLStyleValue *)textLetterSpacing { MGLAssertStyleLayerIsValid(); auto mbglValue = MGLStyleValueTransformer().toInterpolatablePropertyValue(textLetterSpacing); self.rawLayer->setTextLetterSpacing(mbglValue); } - (MGLStyleValue *)textLetterSpacing { MGLAssertStyleLayerIsValid(); auto propertyValue = self.rawLayer->getTextLetterSpacing(); if (propertyValue.isUndefined()) { return MGLStyleValueTransformer().toStyleValue(self.rawLayer->getDefaultTextLetterSpacing()); } return MGLStyleValueTransformer().toStyleValue(propertyValue); } - (void)setTextLineHeight:(MGLStyleValue *)textLineHeight { MGLAssertStyleLayerIsValid(); auto mbglValue = MGLStyleValueTransformer().toInterpolatablePropertyValue(textLineHeight); self.rawLayer->setTextLineHeight(mbglValue); } - (MGLStyleValue *)textLineHeight { MGLAssertStyleLayerIsValid(); auto propertyValue = self.rawLayer->getTextLineHeight(); if (propertyValue.isUndefined()) { return MGLStyleValueTransformer().toStyleValue(self.rawLayer->getDefaultTextLineHeight()); } return MGLStyleValueTransformer().toStyleValue(propertyValue); } - (void)setTextOffset:(MGLStyleValue *)textOffset { MGLAssertStyleLayerIsValid(); auto mbglValue = MGLStyleValueTransformer, NSValue *>().toDataDrivenPropertyValue(textOffset); self.rawLayer->setTextOffset(mbglValue); } - (MGLStyleValue *)textOffset { MGLAssertStyleLayerIsValid(); auto propertyValue = self.rawLayer->getTextOffset(); if (propertyValue.isUndefined()) { return MGLStyleValueTransformer, NSValue *>().toDataDrivenStyleValue(self.rawLayer->getDefaultTextOffset()); } return MGLStyleValueTransformer, NSValue *>().toDataDrivenStyleValue(propertyValue); } - (void)setTextOptional:(MGLStyleValue *)textOptional { MGLAssertStyleLayerIsValid(); auto mbglValue = MGLStyleValueTransformer().toPropertyValue(textOptional); self.rawLayer->setTextOptional(mbglValue); } - (MGLStyleValue *)isTextOptional { MGLAssertStyleLayerIsValid(); auto propertyValue = self.rawLayer->getTextOptional(); if (propertyValue.isUndefined()) { return MGLStyleValueTransformer().toStyleValue(self.rawLayer->getDefaultTextOptional()); } return MGLStyleValueTransformer().toStyleValue(propertyValue); } - (void)setTextPadding:(MGLStyleValue *)textPadding { MGLAssertStyleLayerIsValid(); auto mbglValue = MGLStyleValueTransformer().toInterpolatablePropertyValue(textPadding); self.rawLayer->setTextPadding(mbglValue); } - (MGLStyleValue *)textPadding { MGLAssertStyleLayerIsValid(); auto propertyValue = self.rawLayer->getTextPadding(); if (propertyValue.isUndefined()) { return MGLStyleValueTransformer().toStyleValue(self.rawLayer->getDefaultTextPadding()); } return MGLStyleValueTransformer().toStyleValue(propertyValue); } - (void)setTextPitchAlignment:(MGLStyleValue *)textPitchAlignment { MGLAssertStyleLayerIsValid(); auto mbglValue = MGLStyleValueTransformer().toEnumPropertyValue(textPitchAlignment); self.rawLayer->setTextPitchAlignment(mbglValue); } - (MGLStyleValue *)textPitchAlignment { MGLAssertStyleLayerIsValid(); auto propertyValue = self.rawLayer->getTextPitchAlignment(); if (propertyValue.isUndefined()) { return MGLStyleValueTransformer().toEnumStyleValue(self.rawLayer->getDefaultTextPitchAlignment()); } return MGLStyleValueTransformer().toEnumStyleValue(propertyValue); } - (void)setTextRotation:(MGLStyleValue *)textRotation { MGLAssertStyleLayerIsValid(); auto mbglValue = MGLStyleValueTransformer().toDataDrivenPropertyValue(textRotation); self.rawLayer->setTextRotate(mbglValue); } - (MGLStyleValue *)textRotation { MGLAssertStyleLayerIsValid(); auto propertyValue = self.rawLayer->getTextRotate(); if (propertyValue.isUndefined()) { return MGLStyleValueTransformer().toDataDrivenStyleValue(self.rawLayer->getDefaultTextRotate()); } return MGLStyleValueTransformer().toDataDrivenStyleValue(propertyValue); } - (void)setTextRotate:(MGLStyleValue *)textRotate { } - (MGLStyleValue *)textRotate { return self.textRotation; } - (void)setTextRotationAlignment:(MGLStyleValue *)textRotationAlignment { MGLAssertStyleLayerIsValid(); auto mbglValue = MGLStyleValueTransformer().toEnumPropertyValue(textRotationAlignment); self.rawLayer->setTextRotationAlignment(mbglValue); } - (MGLStyleValue *)textRotationAlignment { MGLAssertStyleLayerIsValid(); auto propertyValue = self.rawLayer->getTextRotationAlignment(); if (propertyValue.isUndefined()) { return MGLStyleValueTransformer().toEnumStyleValue(self.rawLayer->getDefaultTextRotationAlignment()); } return MGLStyleValueTransformer().toEnumStyleValue(propertyValue); } - (void)setTextTransform:(MGLStyleValue *)textTransform { MGLAssertStyleLayerIsValid(); auto mbglValue = MGLStyleValueTransformer().toDataDrivenPropertyValue(textTransform); self.rawLayer->setTextTransform(mbglValue); } - (MGLStyleValue *)textTransform { MGLAssertStyleLayerIsValid(); auto propertyValue = self.rawLayer->getTextTransform(); if (propertyValue.isUndefined()) { return MGLStyleValueTransformer().toDataDrivenStyleValue(self.rawLayer->getDefaultTextTransform()); } return MGLStyleValueTransformer().toDataDrivenStyleValue(propertyValue); } #pragma mark - Accessing the Paint Attributes - (void)setIconColor:(MGLStyleValue *)iconColor { MGLAssertStyleLayerIsValid(); auto mbglValue = MGLStyleValueTransformer().toDataDrivenPropertyValue(iconColor); self.rawLayer->setIconColor(mbglValue); } - (MGLStyleValue *)iconColor { MGLAssertStyleLayerIsValid(); auto propertyValue = self.rawLayer->getIconColor(); if (propertyValue.isUndefined()) { return MGLStyleValueTransformer().toDataDrivenStyleValue(self.rawLayer->getDefaultIconColor()); } return MGLStyleValueTransformer().toDataDrivenStyleValue(propertyValue); } - (void)setIconColorTransition:(MGLTransition )transition { MGLAssertStyleLayerIsValid(); mbgl::style::TransitionOptions options { { MGLDurationFromTimeInterval(transition.duration) }, { MGLDurationFromTimeInterval(transition.delay) } }; self.rawLayer->setIconColorTransition(options); } - (MGLTransition)iconColorTransition { MGLAssertStyleLayerIsValid(); mbgl::style::TransitionOptions transitionOptions = self.rawLayer->getIconColorTransition(); MGLTransition transition; transition.duration = MGLTimeIntervalFromDuration(transitionOptions.duration.value_or(mbgl::Duration::zero())); transition.delay = MGLTimeIntervalFromDuration(transitionOptions.delay.value_or(mbgl::Duration::zero())); return transition; } - (void)setIconHaloBlur:(MGLStyleValue *)iconHaloBlur { MGLAssertStyleLayerIsValid(); auto mbglValue = MGLStyleValueTransformer().toDataDrivenPropertyValue(iconHaloBlur); self.rawLayer->setIconHaloBlur(mbglValue); } - (MGLStyleValue *)iconHaloBlur { MGLAssertStyleLayerIsValid(); auto propertyValue = self.rawLayer->getIconHaloBlur(); if (propertyValue.isUndefined()) { return MGLStyleValueTransformer().toDataDrivenStyleValue(self.rawLayer->getDefaultIconHaloBlur()); } return MGLStyleValueTransformer().toDataDrivenStyleValue(propertyValue); } - (void)setIconHaloBlurTransition:(MGLTransition )transition { MGLAssertStyleLayerIsValid(); mbgl::style::TransitionOptions options { { MGLDurationFromTimeInterval(transition.duration) }, { MGLDurationFromTimeInterval(transition.delay) } }; self.rawLayer->setIconHaloBlurTransition(options); } - (MGLTransition)iconHaloBlurTransition { MGLAssertStyleLayerIsValid(); mbgl::style::TransitionOptions transitionOptions = self.rawLayer->getIconHaloBlurTransition(); MGLTransition transition; transition.duration = MGLTimeIntervalFromDuration(transitionOptions.duration.value_or(mbgl::Duration::zero())); transition.delay = MGLTimeIntervalFromDuration(transitionOptions.delay.value_or(mbgl::Duration::zero())); return transition; } - (void)setIconHaloColor:(MGLStyleValue *)iconHaloColor { MGLAssertStyleLayerIsValid(); auto mbglValue = MGLStyleValueTransformer().toDataDrivenPropertyValue(iconHaloColor); self.rawLayer->setIconHaloColor(mbglValue); } - (MGLStyleValue *)iconHaloColor { MGLAssertStyleLayerIsValid(); auto propertyValue = self.rawLayer->getIconHaloColor(); if (propertyValue.isUndefined()) { return MGLStyleValueTransformer().toDataDrivenStyleValue(self.rawLayer->getDefaultIconHaloColor()); } return MGLStyleValueTransformer().toDataDrivenStyleValue(propertyValue); } - (void)setIconHaloColorTransition:(MGLTransition )transition { MGLAssertStyleLayerIsValid(); mbgl::style::TransitionOptions options { { MGLDurationFromTimeInterval(transition.duration) }, { MGLDurationFromTimeInterval(transition.delay) } }; self.rawLayer->setIconHaloColorTransition(options); } - (MGLTransition)iconHaloColorTransition { MGLAssertStyleLayerIsValid(); mbgl::style::TransitionOptions transitionOptions = self.rawLayer->getIconHaloColorTransition(); MGLTransition transition; transition.duration = MGLTimeIntervalFromDuration(transitionOptions.duration.value_or(mbgl::Duration::zero())); transition.delay = MGLTimeIntervalFromDuration(transitionOptions.delay.value_or(mbgl::Duration::zero())); return transition; } - (void)setIconHaloWidth:(MGLStyleValue *)iconHaloWidth { MGLAssertStyleLayerIsValid(); auto mbglValue = MGLStyleValueTransformer().toDataDrivenPropertyValue(iconHaloWidth); self.rawLayer->setIconHaloWidth(mbglValue); } - (MGLStyleValue *)iconHaloWidth { MGLAssertStyleLayerIsValid(); auto propertyValue = self.rawLayer->getIconHaloWidth(); if (propertyValue.isUndefined()) { return MGLStyleValueTransformer().toDataDrivenStyleValue(self.rawLayer->getDefaultIconHaloWidth()); } return MGLStyleValueTransformer().toDataDrivenStyleValue(propertyValue); } - (void)setIconHaloWidthTransition:(MGLTransition )transition { MGLAssertStyleLayerIsValid(); mbgl::style::TransitionOptions options { { MGLDurationFromTimeInterval(transition.duration) }, { MGLDurationFromTimeInterval(transition.delay) } }; self.rawLayer->setIconHaloWidthTransition(options); } - (MGLTransition)iconHaloWidthTransition { MGLAssertStyleLayerIsValid(); mbgl::style::TransitionOptions transitionOptions = self.rawLayer->getIconHaloWidthTransition(); MGLTransition transition; transition.duration = MGLTimeIntervalFromDuration(transitionOptions.duration.value_or(mbgl::Duration::zero())); transition.delay = MGLTimeIntervalFromDuration(transitionOptions.delay.value_or(mbgl::Duration::zero())); return transition; } - (void)setIconOpacity:(MGLStyleValue *)iconOpacity { MGLAssertStyleLayerIsValid(); auto mbglValue = MGLStyleValueTransformer().toDataDrivenPropertyValue(iconOpacity); self.rawLayer->setIconOpacity(mbglValue); } - (MGLStyleValue *)iconOpacity { MGLAssertStyleLayerIsValid(); auto propertyValue = self.rawLayer->getIconOpacity(); if (propertyValue.isUndefined()) { return MGLStyleValueTransformer().toDataDrivenStyleValue(self.rawLayer->getDefaultIconOpacity()); } return MGLStyleValueTransformer().toDataDrivenStyleValue(propertyValue); } - (void)setIconOpacityTransition:(MGLTransition )transition { MGLAssertStyleLayerIsValid(); mbgl::style::TransitionOptions options { { MGLDurationFromTimeInterval(transition.duration) }, { MGLDurationFromTimeInterval(transition.delay) } }; self.rawLayer->setIconOpacityTransition(options); } - (MGLTransition)iconOpacityTransition { MGLAssertStyleLayerIsValid(); mbgl::style::TransitionOptions transitionOptions = self.rawLayer->getIconOpacityTransition(); MGLTransition transition; transition.duration = MGLTimeIntervalFromDuration(transitionOptions.duration.value_or(mbgl::Duration::zero())); transition.delay = MGLTimeIntervalFromDuration(transitionOptions.delay.value_or(mbgl::Duration::zero())); return transition; } - (void)setIconTranslation:(MGLStyleValue *)iconTranslation { MGLAssertStyleLayerIsValid(); auto mbglValue = MGLStyleValueTransformer, NSValue *>().toInterpolatablePropertyValue(iconTranslation); self.rawLayer->setIconTranslate(mbglValue); } - (MGLStyleValue *)iconTranslation { MGLAssertStyleLayerIsValid(); auto propertyValue = self.rawLayer->getIconTranslate(); if (propertyValue.isUndefined()) { return MGLStyleValueTransformer, NSValue *>().toStyleValue(self.rawLayer->getDefaultIconTranslate()); } return MGLStyleValueTransformer, NSValue *>().toStyleValue(propertyValue); } - (void)setIconTranslationTransition:(MGLTransition )transition { MGLAssertStyleLayerIsValid(); mbgl::style::TransitionOptions options { { MGLDurationFromTimeInterval(transition.duration) }, { MGLDurationFromTimeInterval(transition.delay) } }; self.rawLayer->setIconTranslateTransition(options); } - (MGLTransition)iconTranslationTransition { MGLAssertStyleLayerIsValid(); mbgl::style::TransitionOptions transitionOptions = self.rawLayer->getIconTranslateTransition(); MGLTransition transition; transition.duration = MGLTimeIntervalFromDuration(transitionOptions.duration.value_or(mbgl::Duration::zero())); transition.delay = MGLTimeIntervalFromDuration(transitionOptions.delay.value_or(mbgl::Duration::zero())); return transition; } - (void)setIconTranslate:(MGLStyleValue *)iconTranslate { } - (MGLStyleValue *)iconTranslate { return self.iconTranslation; } - (void)setIconTranslationAnchor:(MGLStyleValue *)iconTranslationAnchor { MGLAssertStyleLayerIsValid(); auto mbglValue = MGLStyleValueTransformer().toEnumPropertyValue(iconTranslationAnchor); self.rawLayer->setIconTranslateAnchor(mbglValue); } - (MGLStyleValue *)iconTranslationAnchor { MGLAssertStyleLayerIsValid(); auto propertyValue = self.rawLayer->getIconTranslateAnchor(); if (propertyValue.isUndefined()) { return MGLStyleValueTransformer().toEnumStyleValue(self.rawLayer->getDefaultIconTranslateAnchor()); } return MGLStyleValueTransformer().toEnumStyleValue(propertyValue); } - (void)setIconTranslateAnchor:(MGLStyleValue *)iconTranslateAnchor { } - (MGLStyleValue *)iconTranslateAnchor { return self.iconTranslationAnchor; } - (void)setTextColor:(MGLStyleValue *)textColor { MGLAssertStyleLayerIsValid(); auto mbglValue = MGLStyleValueTransformer().toDataDrivenPropertyValue(textColor); self.rawLayer->setTextColor(mbglValue); } - (MGLStyleValue *)textColor { MGLAssertStyleLayerIsValid(); auto propertyValue = self.rawLayer->getTextColor(); if (propertyValue.isUndefined()) { return MGLStyleValueTransformer().toDataDrivenStyleValue(self.rawLayer->getDefaultTextColor()); } return MGLStyleValueTransformer().toDataDrivenStyleValue(propertyValue); } - (void)setTextColorTransition:(MGLTransition )transition { MGLAssertStyleLayerIsValid(); mbgl::style::TransitionOptions options { { MGLDurationFromTimeInterval(transition.duration) }, { MGLDurationFromTimeInterval(transition.delay) } }; self.rawLayer->setTextColorTransition(options); } - (MGLTransition)textColorTransition { MGLAssertStyleLayerIsValid(); mbgl::style::TransitionOptions transitionOptions = self.rawLayer->getTextColorTransition(); MGLTransition transition; transition.duration = MGLTimeIntervalFromDuration(transitionOptions.duration.value_or(mbgl::Duration::zero())); transition.delay = MGLTimeIntervalFromDuration(transitionOptions.delay.value_or(mbgl::Duration::zero())); return transition; } - (void)setTextHaloBlur:(MGLStyleValue *)textHaloBlur { MGLAssertStyleLayerIsValid(); auto mbglValue = MGLStyleValueTransformer().toDataDrivenPropertyValue(textHaloBlur); self.rawLayer->setTextHaloBlur(mbglValue); } - (MGLStyleValue *)textHaloBlur { MGLAssertStyleLayerIsValid(); auto propertyValue = self.rawLayer->getTextHaloBlur(); if (propertyValue.isUndefined()) { return MGLStyleValueTransformer().toDataDrivenStyleValue(self.rawLayer->getDefaultTextHaloBlur()); } return MGLStyleValueTransformer().toDataDrivenStyleValue(propertyValue); } - (void)setTextHaloBlurTransition:(MGLTransition )transition { MGLAssertStyleLayerIsValid(); mbgl::style::TransitionOptions options { { MGLDurationFromTimeInterval(transition.duration) }, { MGLDurationFromTimeInterval(transition.delay) } }; self.rawLayer->setTextHaloBlurTransition(options); } - (MGLTransition)textHaloBlurTransition { MGLAssertStyleLayerIsValid(); mbgl::style::TransitionOptions transitionOptions = self.rawLayer->getTextHaloBlurTransition(); MGLTransition transition; transition.duration = MGLTimeIntervalFromDuration(transitionOptions.duration.value_or(mbgl::Duration::zero())); transition.delay = MGLTimeIntervalFromDuration(transitionOptions.delay.value_or(mbgl::Duration::zero())); return transition; } - (void)setTextHaloColor:(MGLStyleValue *)textHaloColor { MGLAssertStyleLayerIsValid(); auto mbglValue = MGLStyleValueTransformer().toDataDrivenPropertyValue(textHaloColor); self.rawLayer->setTextHaloColor(mbglValue); } - (MGLStyleValue *)textHaloColor { MGLAssertStyleLayerIsValid(); auto propertyValue = self.rawLayer->getTextHaloColor(); if (propertyValue.isUndefined()) { return MGLStyleValueTransformer().toDataDrivenStyleValue(self.rawLayer->getDefaultTextHaloColor()); } return MGLStyleValueTransformer().toDataDrivenStyleValue(propertyValue); } - (void)setTextHaloColorTransition:(MGLTransition )transition { MGLAssertStyleLayerIsValid(); mbgl::style::TransitionOptions options { { MGLDurationFromTimeInterval(transition.duration) }, { MGLDurationFromTimeInterval(transition.delay) } }; self.rawLayer->setTextHaloColorTransition(options); } - (MGLTransition)textHaloColorTransition { MGLAssertStyleLayerIsValid(); mbgl::style::TransitionOptions transitionOptions = self.rawLayer->getTextHaloColorTransition(); MGLTransition transition; transition.duration = MGLTimeIntervalFromDuration(transitionOptions.duration.value_or(mbgl::Duration::zero())); transition.delay = MGLTimeIntervalFromDuration(transitionOptions.delay.value_or(mbgl::Duration::zero())); return transition; } - (void)setTextHaloWidth:(MGLStyleValue *)textHaloWidth { MGLAssertStyleLayerIsValid(); auto mbglValue = MGLStyleValueTransformer().toDataDrivenPropertyValue(textHaloWidth); self.rawLayer->setTextHaloWidth(mbglValue); } - (MGLStyleValue *)textHaloWidth { MGLAssertStyleLayerIsValid(); auto propertyValue = self.rawLayer->getTextHaloWidth(); if (propertyValue.isUndefined()) { return MGLStyleValueTransformer().toDataDrivenStyleValue(self.rawLayer->getDefaultTextHaloWidth()); } return MGLStyleValueTransformer().toDataDrivenStyleValue(propertyValue); } - (void)setTextHaloWidthTransition:(MGLTransition )transition { MGLAssertStyleLayerIsValid(); mbgl::style::TransitionOptions options { { MGLDurationFromTimeInterval(transition.duration) }, { MGLDurationFromTimeInterval(transition.delay) } }; self.rawLayer->setTextHaloWidthTransition(options); } - (MGLTransition)textHaloWidthTransition { MGLAssertStyleLayerIsValid(); mbgl::style::TransitionOptions transitionOptions = self.rawLayer->getTextHaloWidthTransition(); MGLTransition transition; transition.duration = MGLTimeIntervalFromDuration(transitionOptions.duration.value_or(mbgl::Duration::zero())); transition.delay = MGLTimeIntervalFromDuration(transitionOptions.delay.value_or(mbgl::Duration::zero())); return transition; } - (void)setTextOpacity:(MGLStyleValue *)textOpacity { MGLAssertStyleLayerIsValid(); auto mbglValue = MGLStyleValueTransformer().toDataDrivenPropertyValue(textOpacity); self.rawLayer->setTextOpacity(mbglValue); } - (MGLStyleValue *)textOpacity { MGLAssertStyleLayerIsValid(); auto propertyValue = self.rawLayer->getTextOpacity(); if (propertyValue.isUndefined()) { return MGLStyleValueTransformer().toDataDrivenStyleValue(self.rawLayer->getDefaultTextOpacity()); } return MGLStyleValueTransformer().toDataDrivenStyleValue(propertyValue); } - (void)setTextOpacityTransition:(MGLTransition )transition { MGLAssertStyleLayerIsValid(); mbgl::style::TransitionOptions options { { MGLDurationFromTimeInterval(transition.duration) }, { MGLDurationFromTimeInterval(transition.delay) } }; self.rawLayer->setTextOpacityTransition(options); } - (MGLTransition)textOpacityTransition { MGLAssertStyleLayerIsValid(); mbgl::style::TransitionOptions transitionOptions = self.rawLayer->getTextOpacityTransition(); MGLTransition transition; transition.duration = MGLTimeIntervalFromDuration(transitionOptions.duration.value_or(mbgl::Duration::zero())); transition.delay = MGLTimeIntervalFromDuration(transitionOptions.delay.value_or(mbgl::Duration::zero())); return transition; } - (void)setTextTranslation:(MGLStyleValue *)textTranslation { MGLAssertStyleLayerIsValid(); auto mbglValue = MGLStyleValueTransformer, NSValue *>().toInterpolatablePropertyValue(textTranslation); self.rawLayer->setTextTranslate(mbglValue); } - (MGLStyleValue *)textTranslation { MGLAssertStyleLayerIsValid(); auto propertyValue = self.rawLayer->getTextTranslate(); if (propertyValue.isUndefined()) { return MGLStyleValueTransformer, NSValue *>().toStyleValue(self.rawLayer->getDefaultTextTranslate()); } return MGLStyleValueTransformer, NSValue *>().toStyleValue(propertyValue); } - (void)setTextTranslationTransition:(MGLTransition )transition { MGLAssertStyleLayerIsValid(); mbgl::style::TransitionOptions options { { MGLDurationFromTimeInterval(transition.duration) }, { MGLDurationFromTimeInterval(transition.delay) } }; self.rawLayer->setTextTranslateTransition(options); } - (MGLTransition)textTranslationTransition { MGLAssertStyleLayerIsValid(); mbgl::style::TransitionOptions transitionOptions = self.rawLayer->getTextTranslateTransition(); MGLTransition transition; transition.duration = MGLTimeIntervalFromDuration(transitionOptions.duration.value_or(mbgl::Duration::zero())); transition.delay = MGLTimeIntervalFromDuration(transitionOptions.delay.value_or(mbgl::Duration::zero())); return transition; } - (void)setTextTranslate:(MGLStyleValue *)textTranslate { } - (MGLStyleValue *)textTranslate { return self.textTranslation; } - (void)setTextTranslationAnchor:(MGLStyleValue *)textTranslationAnchor { MGLAssertStyleLayerIsValid(); auto mbglValue = MGLStyleValueTransformer().toEnumPropertyValue(textTranslationAnchor); self.rawLayer->setTextTranslateAnchor(mbglValue); } - (MGLStyleValue *)textTranslationAnchor { MGLAssertStyleLayerIsValid(); auto propertyValue = self.rawLayer->getTextTranslateAnchor(); if (propertyValue.isUndefined()) { return MGLStyleValueTransformer().toEnumStyleValue(self.rawLayer->getDefaultTextTranslateAnchor()); } return MGLStyleValueTransformer().toEnumStyleValue(propertyValue); } - (void)setTextTranslateAnchor:(MGLStyleValue *)textTranslateAnchor { } - (MGLStyleValue *)textTranslateAnchor { return self.textTranslationAnchor; } @end @implementation NSValue (MGLSymbolStyleLayerAdditions) + (NSValue *)valueWithMGLIconPitchAlignment:(MGLIconPitchAlignment)iconPitchAlignment { return [NSValue value:&iconPitchAlignment withObjCType:@encode(MGLIconPitchAlignment)]; } - (MGLIconPitchAlignment)MGLIconPitchAlignmentValue { MGLIconPitchAlignment iconPitchAlignment; [self getValue:&iconPitchAlignment]; return iconPitchAlignment; } + (NSValue *)valueWithMGLIconRotationAlignment:(MGLIconRotationAlignment)iconRotationAlignment { return [NSValue value:&iconRotationAlignment withObjCType:@encode(MGLIconRotationAlignment)]; } - (MGLIconRotationAlignment)MGLIconRotationAlignmentValue { MGLIconRotationAlignment iconRotationAlignment; [self getValue:&iconRotationAlignment]; return iconRotationAlignment; } + (NSValue *)valueWithMGLIconTextFit:(MGLIconTextFit)iconTextFit { return [NSValue value:&iconTextFit withObjCType:@encode(MGLIconTextFit)]; } - (MGLIconTextFit)MGLIconTextFitValue { MGLIconTextFit iconTextFit; [self getValue:&iconTextFit]; return iconTextFit; } + (NSValue *)valueWithMGLSymbolPlacement:(MGLSymbolPlacement)symbolPlacement { return [NSValue value:&symbolPlacement withObjCType:@encode(MGLSymbolPlacement)]; } - (MGLSymbolPlacement)MGLSymbolPlacementValue { MGLSymbolPlacement symbolPlacement; [self getValue:&symbolPlacement]; return symbolPlacement; } + (NSValue *)valueWithMGLTextAnchor:(MGLTextAnchor)textAnchor { return [NSValue value:&textAnchor withObjCType:@encode(MGLTextAnchor)]; } - (MGLTextAnchor)MGLTextAnchorValue { MGLTextAnchor textAnchor; [self getValue:&textAnchor]; return textAnchor; } + (NSValue *)valueWithMGLTextJustification:(MGLTextJustification)textJustification { return [NSValue value:&textJustification withObjCType:@encode(MGLTextJustification)]; } - (MGLTextJustification)MGLTextJustificationValue { MGLTextJustification textJustification; [self getValue:&textJustification]; return textJustification; } + (NSValue *)valueWithMGLTextPitchAlignment:(MGLTextPitchAlignment)textPitchAlignment { return [NSValue value:&textPitchAlignment withObjCType:@encode(MGLTextPitchAlignment)]; } - (MGLTextPitchAlignment)MGLTextPitchAlignmentValue { MGLTextPitchAlignment textPitchAlignment; [self getValue:&textPitchAlignment]; return textPitchAlignment; } + (NSValue *)valueWithMGLTextRotationAlignment:(MGLTextRotationAlignment)textRotationAlignment { return [NSValue value:&textRotationAlignment withObjCType:@encode(MGLTextRotationAlignment)]; } - (MGLTextRotationAlignment)MGLTextRotationAlignmentValue { MGLTextRotationAlignment textRotationAlignment; [self getValue:&textRotationAlignment]; return textRotationAlignment; } + (NSValue *)valueWithMGLTextTransform:(MGLTextTransform)textTransform { return [NSValue value:&textTransform withObjCType:@encode(MGLTextTransform)]; } - (MGLTextTransform)MGLTextTransformValue { MGLTextTransform textTransform; [self getValue:&textTransform]; return textTransform; } + (NSValue *)valueWithMGLIconTranslationAnchor:(MGLIconTranslationAnchor)iconTranslationAnchor { return [NSValue value:&iconTranslationAnchor withObjCType:@encode(MGLIconTranslationAnchor)]; } - (MGLIconTranslationAnchor)MGLIconTranslationAnchorValue { MGLIconTranslationAnchor iconTranslationAnchor; [self getValue:&iconTranslationAnchor]; return iconTranslationAnchor; } + (NSValue *)valueWithMGLTextTranslationAnchor:(MGLTextTranslationAnchor)textTranslationAnchor { return [NSValue value:&textTranslationAnchor withObjCType:@encode(MGLTextTranslationAnchor)]; } - (MGLTextTranslationAnchor)MGLTextTranslationAnchorValue { MGLTextTranslationAnchor textTranslationAnchor; [self getValue:&textTranslationAnchor]; return textTranslationAnchor; } @end