summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/mbgl/style/property_expression.hpp5
-rw-r--r--src/mbgl/style/property_expression.cpp4
2 files changed, 9 insertions, 0 deletions
diff --git a/include/mbgl/style/property_expression.hpp b/include/mbgl/style/property_expression.hpp
index 7dcd818dde..7439ac9ca1 100644
--- a/include/mbgl/style/property_expression.hpp
+++ b/include/mbgl/style/property_expression.hpp
@@ -21,6 +21,11 @@ public:
Range<float> 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<const expression::Expression> getSharedExpression() const noexcept;
+
bool useIntegerZoom = false;
protected:
diff --git a/src/mbgl/style/property_expression.cpp b/src/mbgl/style/property_expression.cpp
index d531181e71..8d603e4b15 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<const expression::Expression> PropertyExpressionBase::getSharedExpression() const noexcept {
+ return expression;
+}
+
} // namespace style
} // namespace mbgl