diff options
Diffstat (limited to 'include/llmr/style')
-rw-r--r-- | include/llmr/style/bucket_description.hpp | 3 | ||||
-rw-r--r-- | include/llmr/style/class_description.hpp | 1 | ||||
-rw-r--r-- | include/llmr/style/properties.hpp | 8 | ||||
-rw-r--r-- | include/llmr/style/style.hpp | 1 | ||||
-rw-r--r-- | include/llmr/style/style_parser.hpp | 1 |
5 files changed, 14 insertions, 0 deletions
diff --git a/include/llmr/style/bucket_description.hpp b/include/llmr/style/bucket_description.hpp index c935d50613..0a750e113e 100644 --- a/include/llmr/style/bucket_description.hpp +++ b/include/llmr/style/bucket_description.hpp @@ -35,6 +35,7 @@ inline BucketType bucketType(const std::string& type) { if (type == "fill") return BucketType::Fill; else if (type == "line") return BucketType::Line; else if (type == "point") return BucketType::Point; + else if (type == "text") return BucketType::Text; else return BucketType::None; } @@ -58,6 +59,7 @@ public: CapType cap = CapType::None; JoinType join = JoinType::None; std::string font; + std::string text_field; float font_size = 0.0f; float miter_limit = 2.0f; float round_limit = 1.0f; @@ -65,6 +67,7 @@ public: class BucketDescription { public: + BucketType feature_type = BucketType::None; BucketType type = BucketType::None; // Specify what data to pull into this bucket diff --git a/include/llmr/style/class_description.hpp b/include/llmr/style/class_description.hpp index efb46fd39b..e98aee0c56 100644 --- a/include/llmr/style/class_description.hpp +++ b/include/llmr/style/class_description.hpp @@ -14,6 +14,7 @@ public: std::map<std::string, FillClass> fill; std::map<std::string, LineClass> line; std::map<std::string, PointClass> point; + std::map<std::string, TextClass> text; }; diff --git a/include/llmr/style/properties.hpp b/include/llmr/style/properties.hpp index de7b3404b7..f3bc1054cd 100644 --- a/include/llmr/style/properties.hpp +++ b/include/llmr/style/properties.hpp @@ -112,6 +112,14 @@ struct FillProperties { std::string image; }; +struct TextClass { + Color color = {{ 1, 1, 1, 1 }}; +}; + +struct TextProperties { + Color color = {{ 1, 1, 1, 1 }}; +}; + struct BackgroundClass { Color color = {{ 1, 1, 1, 1 }}; }; diff --git a/include/llmr/style/style.hpp b/include/llmr/style/style.hpp index 1b57521f85..2323228b03 100644 --- a/include/llmr/style/style.hpp +++ b/include/llmr/style/style.hpp @@ -56,6 +56,7 @@ public: std::map<std::string, FillProperties> fills; std::map<std::string, LineProperties> lines; std::map<std::string, PointProperties> points; + std::map<std::string, TextProperties> texts; } computed; }; diff --git a/include/llmr/style/style_parser.hpp b/include/llmr/style/style_parser.hpp index 3c53037aa1..93cd373b6c 100644 --- a/include/llmr/style/style_parser.hpp +++ b/include/llmr/style/style_parser.hpp @@ -23,6 +23,7 @@ private: FillClass parseFillClass(JSVal value); LineClass parseLineClass(JSVal value); PointClass parsePointClass(JSVal value); + TextClass parseTextClass(JSVal value); BackgroundClass parseBackgroundClass(JSVal value); bool parseBoolean(JSVal value); |