summaryrefslogtreecommitdiff
path: root/include/mbgl/layer/symbol_layer.hpp
blob: 2339515201446b5844392f80891e5405a6375aaa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
// This file is generated. Do not edit.

#pragma once

#include <mbgl/style/layer.hpp>
#include <mbgl/style/property_value.hpp>

#include <vector>

namespace mbgl {

class SymbolLayer : public Layer {
public:
    SymbolLayer(const std::string& layerID);
    ~SymbolLayer() final;

    // Source

    void setSource(const std::string& sourceID, const std::string& sourceLayer);
    const std::string& getSourceID() const;
    const std::string& getSourceLayer() const;

    // Layout properties

    PropertyValue<SymbolPlacementType> getSymbolPlacement() const;
    void setSymbolPlacement(PropertyValue<SymbolPlacementType>);

    PropertyValue<float> getSymbolSpacing() const;
    void setSymbolSpacing(PropertyValue<float>);

    PropertyValue<bool> getSymbolAvoidEdges() const;
    void setSymbolAvoidEdges(PropertyValue<bool>);

    PropertyValue<bool> getIconAllowOverlap() const;
    void setIconAllowOverlap(PropertyValue<bool>);

    PropertyValue<bool> getIconIgnorePlacement() const;
    void setIconIgnorePlacement(PropertyValue<bool>);

    PropertyValue<bool> getIconOptional() const;
    void setIconOptional(PropertyValue<bool>);

    PropertyValue<RotationAlignmentType> getIconRotationAlignment() const;
    void setIconRotationAlignment(PropertyValue<RotationAlignmentType>);

    PropertyValue<float> getIconSize() const;
    void setIconSize(PropertyValue<float>);

    PropertyValue<std::string> getIconImage() const;
    void setIconImage(PropertyValue<std::string>);

    PropertyValue<float> getIconRotate() const;
    void setIconRotate(PropertyValue<float>);

    PropertyValue<float> getIconPadding() const;
    void setIconPadding(PropertyValue<float>);

    PropertyValue<bool> getIconKeepUpright() const;
    void setIconKeepUpright(PropertyValue<bool>);

    PropertyValue<std::array<float, 2>> getIconOffset() const;
    void setIconOffset(PropertyValue<std::array<float, 2>>);

    PropertyValue<RotationAlignmentType> getTextRotationAlignment() const;
    void setTextRotationAlignment(PropertyValue<RotationAlignmentType>);

    PropertyValue<std::string> getTextField() const;
    void setTextField(PropertyValue<std::string>);

    PropertyValue<std::vector<std::string>> getTextFont() const;
    void setTextFont(PropertyValue<std::vector<std::string>>);

    PropertyValue<float> getTextSize() const;
    void setTextSize(PropertyValue<float>);

    PropertyValue<float> getTextMaxWidth() const;
    void setTextMaxWidth(PropertyValue<float>);

    PropertyValue<float> getTextLineHeight() const;
    void setTextLineHeight(PropertyValue<float>);

    PropertyValue<float> getTextLetterSpacing() const;
    void setTextLetterSpacing(PropertyValue<float>);

    PropertyValue<TextJustifyType> getTextJustify() const;
    void setTextJustify(PropertyValue<TextJustifyType>);

    PropertyValue<TextAnchorType> getTextAnchor() const;
    void setTextAnchor(PropertyValue<TextAnchorType>);

    PropertyValue<float> getTextMaxAngle() const;
    void setTextMaxAngle(PropertyValue<float>);

    PropertyValue<float> getTextRotate() const;
    void setTextRotate(PropertyValue<float>);

    PropertyValue<float> getTextPadding() const;
    void setTextPadding(PropertyValue<float>);

    PropertyValue<bool> getTextKeepUpright() const;
    void setTextKeepUpright(PropertyValue<bool>);

    PropertyValue<TextTransformType> getTextTransform() const;
    void setTextTransform(PropertyValue<TextTransformType>);

    PropertyValue<std::array<float, 2>> getTextOffset() const;
    void setTextOffset(PropertyValue<std::array<float, 2>>);

    PropertyValue<bool> getTextAllowOverlap() const;
    void setTextAllowOverlap(PropertyValue<bool>);

    PropertyValue<bool> getTextIgnorePlacement() const;
    void setTextIgnorePlacement(PropertyValue<bool>);

    PropertyValue<bool> getTextOptional() const;
    void setTextOptional(PropertyValue<bool>);

    // Paint properties

    PropertyValue<float> getIconOpacity() const;
    void setIconOpacity(PropertyValue<float>);

    PropertyValue<Color> getIconColor() const;
    void setIconColor(PropertyValue<Color>);

    PropertyValue<Color> getIconHaloColor() const;
    void setIconHaloColor(PropertyValue<Color>);

    PropertyValue<float> getIconHaloWidth() const;
    void setIconHaloWidth(PropertyValue<float>);

    PropertyValue<float> getIconHaloBlur() const;
    void setIconHaloBlur(PropertyValue<float>);

    PropertyValue<std::array<float, 2>> getIconTranslate() const;
    void setIconTranslate(PropertyValue<std::array<float, 2>>);

    PropertyValue<TranslateAnchorType> getIconTranslateAnchor() const;
    void setIconTranslateAnchor(PropertyValue<TranslateAnchorType>);

    PropertyValue<float> getTextOpacity() const;
    void setTextOpacity(PropertyValue<float>);

    PropertyValue<Color> getTextColor() const;
    void setTextColor(PropertyValue<Color>);

    PropertyValue<Color> getTextHaloColor() const;
    void setTextHaloColor(PropertyValue<Color>);

    PropertyValue<float> getTextHaloWidth() const;
    void setTextHaloWidth(PropertyValue<float>);

    PropertyValue<float> getTextHaloBlur() const;
    void setTextHaloBlur(PropertyValue<float>);

    PropertyValue<std::array<float, 2>> getTextTranslate() const;
    void setTextTranslate(PropertyValue<std::array<float, 2>>);

    PropertyValue<TranslateAnchorType> getTextTranslateAnchor() const;
    void setTextTranslateAnchor(PropertyValue<TranslateAnchorType>);

    // Private implementation

    class Impl;
    Impl* const impl;

    SymbolLayer(const Impl&);
    SymbolLayer(const SymbolLayer&) = delete;
};

template <>
inline bool Layer::is<SymbolLayer>() const {
    return type == Type::Symbol;
}

} // namespace mbgl