diff options
Diffstat (limited to 'src/mbgl/style/style_layer.hpp')
-rw-r--r-- | src/mbgl/style/style_layer.hpp | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/src/mbgl/style/style_layer.hpp b/src/mbgl/style/style_layer.hpp index a27e8a89cf..8ab41c6a6d 100644 --- a/src/mbgl/style/style_layer.hpp +++ b/src/mbgl/style/style_layer.hpp @@ -2,6 +2,8 @@ #define MBGL_STYLE_STYLE_LAYER #include <mbgl/style/types.hpp> +#include <mbgl/style/filter_expression.hpp> +#include <mbgl/style/class_properties.hpp> #include <mbgl/style/paint_properties_map.hpp> #include <mbgl/renderer/render_pass.hpp> @@ -17,7 +19,6 @@ namespace mbgl { -class StyleBucket; class StyleCalculationParameters; class PropertyTransition; @@ -32,6 +33,9 @@ public: virtual void parseLayout(const JSVal& value) = 0; virtual void parsePaints(const JSVal& value) = 0; + // If the layer has a ref, the ref. Otherwise, the id. + const std::string& bucketName() const; + // Partially evaluate paint properties based on a set of classes. void cascade(const std::vector<std::string>& classNames, const TimePoint& now, @@ -47,14 +51,16 @@ public: bool hasRenderPass(RenderPass) const; public: + StyleLayerType type; std::string id; - StyleLayerType type = StyleLayerType::Unknown; - - // Bucket information, telling the renderer how to generate the geometries - // for this layer (feature property filters, tessellation instructions, ...). - util::ptr<StyleBucket> bucket; - - // Contains all paint classes that can be applied to this layer. + std::string ref; + std::string source; + std::string sourceLayer; + FilterExpression filter; + float minZoom = -std::numeric_limits<float>::infinity(); + float maxZoom = std::numeric_limits<float>::infinity(); + VisibilityType visibility = VisibilityType::Visible; + ClassProperties layout; PaintPropertiesMap paints; protected: |