MapLibre Native Core
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
symbol_layer.hpp
Go to the documentation of this file.
1 // clang-format off
2 
3 // This file is generated. Do not edit.
4 
5 #pragma once
6 
7 #include <mbgl/style/layer.hpp>
8 #include <mbgl/style/filter.hpp>
11 #include <mbgl/util/color.hpp>
12 
13 #include <vector>
14 
15 namespace mbgl {
16 namespace style {
17 
18 class TransitionOptions;
19 
20 class SymbolLayer final : public Layer {
21 public:
22  SymbolLayer(const std::string& layerID, const std::string& sourceID);
23  ~SymbolLayer() override;
24 
25  // Layout properties
26 
30 
34 
38 
42 
46 
49  void setIconOffset(const PropertyValue<std::array<float, 2>>&);
50 
54 
58 
62 
66 
70 
74 
78 
81  void setIconTextFitPadding(const PropertyValue<std::array<float, 4>>&);
82 
86 
90 
94 
98 
102 
106 
110 
114 
117  void setTextFont(const PropertyValue<std::vector<std::string>>&);
118 
122 
126 
130 
134 
138 
142 
146 
149  void setTextOffset(const PropertyValue<std::array<float, 2>>&);
150 
154 
158 
162 
166 
170 
174 
178 
182 
185  void setTextVariableAnchor(const PropertyValue<std::vector<TextVariableAnchorType>>&);
186 
189  void setTextWritingMode(const PropertyValue<std::vector<TextWritingModeType>>&);
190 
191  // Paint properties
192 
198 
204 
210 
216 
222 
225  void setIconTranslate(const PropertyValue<std::array<float, 2>>&);
228 
234 
240 
246 
252 
258 
264 
267  void setTextTranslate(const PropertyValue<std::array<float, 2>>&);
270 
276 
277  // Private implementation
278 
279  class Impl;
280  const Impl& impl() const;
281 
284  std::unique_ptr<Layer> cloneRef(const std::string& id) const final;
285 
286 protected:
287  // Dynamic properties
288  std::optional<conversion::Error> setPropertyInternal(const std::string& name, const conversion::Convertible& value) final;
289 
290  StyleProperty getProperty(const std::string& name) const final;
291  Value serialize() const final;
292 
293  Mutable<Layer::Impl> mutableBaseImpl() const final;
294 };
295 
296 } // namespace style
297 } // namespace mbgl
298 
299 // clang-format on
Generic representation of a style property.
TransitionOptions getIconTranslateTransition() const
void setTextTranslate(const PropertyValue< std::array< float, 2 >> &)
void setIconAnchor(const PropertyValue< SymbolAnchorType > &)
void setIconHaloWidth(const PropertyValue< float > &)
void setIconColor(const PropertyValue< Color > &)
static PropertyValue< std::vector< TextVariableAnchorType > > getDefaultTextVariableAnchor()
static PropertyValue< expression::Image > getDefaultIconImage()
TransitionOptions getTextHaloBlurTransition() const
const PropertyValue< float > & getIconPadding() const
const PropertyValue< std::array< float, 4 > > & getIconTextFitPadding() const
const PropertyValue< TextJustifyType > & getTextJustify() const
static PropertyValue< AlignmentType > getDefaultTextRotationAlignment()
void setIconTranslate(const PropertyValue< std::array< float, 2 >> &)
const PropertyValue< float > & getTextHaloWidth() const
static PropertyValue< float > getDefaultTextHaloBlur()
void setTextTranslateTransition(const TransitionOptions &)
void setIconTranslateAnchor(const PropertyValue< TranslateAnchorType > &)
void setIconTextFitPadding(const PropertyValue< std::array< float, 4 >> &)
const PropertyValue< Color > & getIconColor() const
const PropertyValue< float > & getTextOpacity() const
const PropertyValue< SymbolPlacementType > & getSymbolPlacement() const
static PropertyValue< SymbolZOrderType > getDefaultSymbolZOrder()
const PropertyValue< std::array< float, 2 > > & getIconOffset() const
TransitionOptions getTextColorTransition() const
void setTextRotate(const PropertyValue< float > &)
static PropertyValue< float > getDefaultTextOpacity()
Mutable< Layer::Impl > mutableBaseImpl() const final
void setIconAllowOverlap(const PropertyValue< bool > &)
static PropertyValue< TextTransformType > getDefaultTextTransform()
void setIconHaloWidthTransition(const TransitionOptions &)
static PropertyValue< float > getDefaultIconPadding()
TransitionOptions getTextHaloWidthTransition() const
void setSymbolAvoidEdges(const PropertyValue< bool > &)
void setIconRotationAlignment(const PropertyValue< AlignmentType > &)
const PropertyValue< float > & getIconSize() const
static PropertyValue< float > getDefaultIconSize()
const PropertyValue< AlignmentType > & getTextRotationAlignment() const
void setSymbolZOrder(const PropertyValue< SymbolZOrderType > &)
TransitionOptions getIconHaloColorTransition() const
const PropertyValue< float > & getTextLetterSpacing() const
void setTextMaxWidth(const PropertyValue< float > &)
const PropertyValue< float > & getTextRotate() const
void setTextPadding(const PropertyValue< float > &)
const PropertyValue< TranslateAnchorType > & getIconTranslateAnchor() const
static PropertyValue< Color > getDefaultTextHaloColor()
static PropertyValue< std::array< float, 2 > > getDefaultTextOffset()
static PropertyValue< std::array< float, 4 > > getDefaultIconTextFitPadding()
static PropertyValue< TranslateAnchorType > getDefaultTextTranslateAnchor()
void setIconRotate(const PropertyValue< float > &)
static PropertyValue< SymbolPlacementType > getDefaultSymbolPlacement()
TransitionOptions getTextOpacityTransition() const
const PropertyValue< float > & getSymbolSpacing() const
Value serialize() const final
const PropertyValue< bool > & getIconKeepUpright() const
void setTextSize(const PropertyValue< float > &)
void setTextVariableAnchor(const PropertyValue< std::vector< TextVariableAnchorType >> &)
static PropertyValue< float > getDefaultSymbolSpacing()
const PropertyValue< SymbolZOrderType > & getSymbolZOrder() const
void setIconOffset(const PropertyValue< std::array< float, 2 >> &)
TransitionOptions getIconHaloBlurTransition() const
const PropertyValue< bool > & getTextOptional() const
void setIconOpacity(const PropertyValue< float > &)
void setIconKeepUpright(const PropertyValue< bool > &)
void setTextOptional(const PropertyValue< bool > &)
void setTextHaloWidthTransition(const TransitionOptions &)
void setIconOpacityTransition(const TransitionOptions &)
const PropertyValue< std::vector< std::string > > & getTextFont() const
static PropertyValue< bool > getDefaultSymbolAvoidEdges()
const PropertyValue< AlignmentType > & getIconPitchAlignment() const
static PropertyValue< SymbolAnchorType > getDefaultTextAnchor()
void setTextIgnorePlacement(const PropertyValue< bool > &)
void setTextHaloColorTransition(const TransitionOptions &)
const PropertyValue< SymbolAnchorType > & getIconAnchor() const
void setTextRotationAlignment(const PropertyValue< AlignmentType > &)
const PropertyValue< SymbolAnchorType > & getTextAnchor() const
static PropertyValue< bool > getDefaultTextAllowOverlap()
void setIconTranslateAnchorTransition(const TransitionOptions &)
static PropertyValue< bool > getDefaultTextIgnorePlacement()
const PropertyValue< float > & getIconOpacity() const
SymbolLayer(Immutable< Impl >)
const PropertyValue< bool > & getIconAllowOverlap() const
void setIconHaloBlurTransition(const TransitionOptions &)
static PropertyValue< bool > getDefaultIconAllowOverlap()
const PropertyValue< IconTextFitType > & getIconTextFit() const
static PropertyValue< float > getDefaultTextMaxWidth()
void setTextOffset(const PropertyValue< std::array< float, 2 >> &)
void setTextTranslateAnchor(const PropertyValue< TranslateAnchorType > &)
const PropertyValue< float > & getTextSize() const
static PropertyValue< float > getDefaultTextRotate()
void setIconTextFit(const PropertyValue< IconTextFitType > &)
const PropertyValue< bool > & getIconIgnorePlacement() const
const PropertyValue< float > & getTextMaxAngle() const
static PropertyValue< float > getDefaultSymbolSortKey()
static PropertyValue< bool > getDefaultTextKeepUpright()
void setTextRadialOffset(const PropertyValue< float > &)
void setTextLetterSpacing(const PropertyValue< float > &)
const PropertyValue< float > & getIconHaloBlur() const
void setTextAnchor(const PropertyValue< SymbolAnchorType > &)
const PropertyValue< Color > & getTextHaloColor() const
static PropertyValue< float > getDefaultTextLetterSpacing()
static PropertyValue< float > getDefaultTextRadialOffset()
const PropertyValue< float > & getIconRotate() const
StyleProperty getProperty(const std::string &name) const final
void setTextHaloWidth(const PropertyValue< float > &)
const PropertyValue< TranslateAnchorType > & getTextTranslateAnchor() const
void setTextMaxAngle(const PropertyValue< float > &)
void setTextColorTransition(const TransitionOptions &)
void setTextWritingMode(const PropertyValue< std::vector< TextWritingModeType >> &)
static PropertyValue< std::array< float, 2 > > getDefaultIconOffset()
const PropertyValue< bool > & getTextIgnorePlacement() const
static PropertyValue< Color > getDefaultTextColor()
void setIconPitchAlignment(const PropertyValue< AlignmentType > &)
const PropertyValue< std::array< float, 2 > > & getIconTranslate() const
void setSymbolPlacement(const PropertyValue< SymbolPlacementType > &)
void setTextJustify(const PropertyValue< TextJustifyType > &)
void setTextTransform(const PropertyValue< TextTransformType > &)
static PropertyValue< bool > getDefaultIconKeepUpright()
static PropertyValue< float > getDefaultTextHaloWidth()
static PropertyValue< TextJustifyType > getDefaultTextJustify()
std::optional< conversion::Error > setPropertyInternal(const std::string &name, const conversion::Convertible &value) final
const PropertyValue< float > & getSymbolSortKey() const
const PropertyValue< Color > & getTextColor() const
const PropertyValue< bool > & getTextKeepUpright() const
const PropertyValue< float > & getIconHaloWidth() const
static PropertyValue< bool > getDefaultTextOptional()
void setTextKeepUpright(const PropertyValue< bool > &)
static PropertyValue< AlignmentType > getDefaultTextPitchAlignment()
static PropertyValue< AlignmentType > getDefaultIconPitchAlignment()
void setTextAllowOverlap(const PropertyValue< bool > &)
void setTextPitchAlignment(const PropertyValue< AlignmentType > &)
static PropertyValue< float > getDefaultTextLineHeight()
static PropertyValue< IconTextFitType > getDefaultIconTextFit()
const PropertyValue< AlignmentType > & getTextPitchAlignment() const
const PropertyValue< std::array< float, 2 > > & getTextOffset() const
const PropertyValue< float > & getTextHaloBlur() const
void setTextHaloColor(const PropertyValue< Color > &)
static PropertyValue< bool > getDefaultIconOptional()
const Impl & impl() const
void setTextColor(const PropertyValue< Color > &)
const PropertyValue< Color > & getIconHaloColor() const
void setIconSize(const PropertyValue< float > &)
void setIconPadding(const PropertyValue< float > &)
static PropertyValue< bool > getDefaultIconIgnorePlacement()
TransitionOptions getTextHaloColorTransition() const
void setTextTranslateAnchorTransition(const TransitionOptions &)
static PropertyValue< Color > getDefaultIconColor()
static PropertyValue< float > getDefaultTextPadding()
static PropertyValue< std::vector< TextWritingModeType > > getDefaultTextWritingMode()
const PropertyValue< bool > & getSymbolAvoidEdges() const
const PropertyValue< expression::Image > & getIconImage() const
void setIconHaloColorTransition(const TransitionOptions &)
static PropertyValue< float > getDefaultIconOpacity()
const PropertyValue< bool > & getTextAllowOverlap() const
void setIconTranslateTransition(const TransitionOptions &)
void setIconOptional(const PropertyValue< bool > &)
void setIconIgnorePlacement(const PropertyValue< bool > &)
TransitionOptions getIconTranslateAnchorTransition() const
const PropertyValue< float > & getTextMaxWidth() const
void setTextOpacityTransition(const TransitionOptions &)
void setTextLineHeight(const PropertyValue< float > &)
static PropertyValue< std::array< float, 2 > > getDefaultTextTranslate()
const PropertyValue< AlignmentType > & getIconRotationAlignment() const
static PropertyValue< TranslateAnchorType > getDefaultIconTranslateAnchor()
const PropertyValue< std::vector< TextWritingModeType > > & getTextWritingMode() const
const PropertyValue< float > & getTextPadding() const
void setTextHaloBlur(const PropertyValue< float > &)
const PropertyValue< expression::Formatted > & getTextField() const
void setSymbolSortKey(const PropertyValue< float > &)
const PropertyValue< bool > & getIconOptional() const
static PropertyValue< float > getDefaultIconHaloBlur()
void setIconHaloColor(const PropertyValue< Color > &)
static PropertyValue< Color > getDefaultIconHaloColor()
static PropertyValue< std::vector< std::string > > getDefaultTextFont()
TransitionOptions getTextTranslateTransition() const
static PropertyValue< expression::Formatted > getDefaultTextField()
static PropertyValue< float > getDefaultTextSize()
static PropertyValue< std::array< float, 2 > > getDefaultIconTranslate()
std::unique_ptr< Layer > cloneRef(const std::string &id) const final
static PropertyValue< float > getDefaultIconRotate()
TransitionOptions getIconColorTransition() const
void setIconColorTransition(const TransitionOptions &)
static PropertyValue< float > getDefaultTextMaxAngle()
static PropertyValue< float > getDefaultIconHaloWidth()
const PropertyValue< TextTransformType > & getTextTransform() const
void setIconHaloBlur(const PropertyValue< float > &)
void setTextOpacity(const PropertyValue< float > &)
void setTextField(const PropertyValue< expression::Formatted > &)
TransitionOptions getIconHaloWidthTransition() const
Mutable< Impl > mutableImpl() const
const PropertyValue< float > & getTextLineHeight() const
const PropertyValue< float > & getTextRadialOffset() const
TransitionOptions getIconOpacityTransition() const
static PropertyValue< SymbolAnchorType > getDefaultIconAnchor()
SymbolLayer(const std::string &layerID, const std::string &sourceID)
void setSymbolSpacing(const PropertyValue< float > &)
static PropertyValue< AlignmentType > getDefaultIconRotationAlignment()
void setTextHaloBlurTransition(const TransitionOptions &)
const PropertyValue< std::vector< TextVariableAnchorType > > & getTextVariableAnchor() const
void setTextFont(const PropertyValue< std::vector< std::string >> &)
void setIconImage(const PropertyValue< expression::Image > &)
const PropertyValue< std::array< float, 2 > > & getTextTranslate() const
TransitionOptions getTextTranslateAnchorTransition() const
std::unique_ptr< Expression > string(std::unique_ptr< Expression >, std::unique_ptr< Expression > def=nullptr)
Definition: actor.hpp:15
mapbox::base::Value Value
Definition: feature.hpp:11