diff --git a/include/mbgl/style/property_expression.hpp b/include/mbgl/style/property_expression.hpp index 7dcd818dd..7439ac9ca 100644 --- a/include/mbgl/style/property_expression.hpp +++ b/include/mbgl/style/property_expression.hpp @@ -21,6 +21,11 @@ public: Range getCoveringStops(const float, const float) const noexcept; const expression::Expression& getExpression() const noexcept; + // Can be used for aggregating property expressions from multiple + // properties(layers) into single match / case expression. Method may + // be removed if a better way of aggregation is found. + std::shared_ptr getSharedExpression() const noexcept; + bool useIntegerZoom = false; protected: diff --git a/src/mbgl/style/property_expression.cpp b/src/mbgl/style/property_expression.cpp index d531181e7..8d603e4b1 100644 --- a/src/mbgl/style/property_expression.cpp +++ b/src/mbgl/style/property_expression.cpp @@ -54,5 +54,9 @@ const expression::Expression& PropertyExpressionBase::getExpression() const noex return *expression; } +std::shared_ptr PropertyExpressionBase::getSharedExpression() const noexcept { + return expression; +} + } // namespace style } // namespace mbgl