You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Backport release/v0.17] feature state expression API (#8166)
Backport mapbox/mapbox-sdk#8049 to
`release/v0.17`.
cc @mapbox/maps-android
cc @mapbox/maps-ios
cc @mapbox/sdk-ci
Co-authored-by: Natig Babayev <natig.babayev@mapbox.com>
GitOrigin-RevId: e1a70ef455a6ecf4bee1767fce8a1dcb32d0ec11
* Make `line-emissive-strength` property data-driven.
15
+
* Add experimental `MapboxMap.setFeatureStateExpression()`, `removeFeatureStateExpression()`, and `resetFeatureStateExpressions()` APIs to efficiently update feature state for multiple features at once using expressions.
/// Sets a feature state expression that applies to features within the specified featureset.
1680
+
///
1681
+
/// All feature states with expressions that evaluate to true will be applied to the feature.
1682
+
/// Feature states from later added feature state expressions have higher priority. Regular feature states have higher priority than feature state expressions.
1683
+
/// The final feature state is determined by applying states in order from lower to higher priority. As a result, multiple expressions that set states with different keys can affect the same features simultaneously.
1684
+
/// If an expression is added for a feature set, properties from that feature set are used, not the properties from original sources.
1685
+
///
1686
+
/// Note that updates to feature state expressions are asynchronous, so changes made by this method might not be
1687
+
/// immediately visible and will have some delay. The displayed data will not be affected immediately.
1688
+
///
1689
+
/// - Parameters:
1690
+
/// - expressionId: Unique identifier for the state expression.
1691
+
/// - featureset: The featureset descriptor that specifies which featureset the expression applies to.
1692
+
/// - expression: The expression to evaluate for the state. Should return boolean.
1693
+
/// - state: The `state` object with properties to update with their respective new values.
0 commit comments