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
* Make `line-emissive-strength` property data-driven.
17
+
* Add experimental `MapboxMap.setFeatureStateExpression()`, `removeFeatureStateExpression()`, and `resetFeatureStateExpressions()` APIs to efficiently update feature state for multiple features at once using expressions.
17
18
18
19
## Bug fixes 🐞
19
20
* Fix camera listener not unsubscribed when disabling ScaleBar via `updateSettings { enabled = false }`
Copy file name to clipboardExpand all lines: maps-sdk/api/maps-sdk.api
+3Lines changed: 3 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -283,6 +283,7 @@ public final class com/mapbox/maps/MapboxMap : com/mapbox/maps/MapboxStyleManage
283
283
public fun removeFeatureState (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lcom/mapbox/maps/FeatureStateOperationCallback;)Lcom/mapbox/common/Cancelable;
284
284
public static synthetic fun removeFeatureState$default (Lcom/mapbox/maps/MapboxMap;Lcom/mapbox/maps/interactions/FeaturesetFeature;Lcom/mapbox/maps/interactions/FeatureStateKey;Lcom/mapbox/maps/FeatureStateOperationCallback;ILjava/lang/Object;)Lcom/mapbox/common/Cancelable;
285
285
public static synthetic fun removeFeatureState$default (Lcom/mapbox/maps/MapboxMap;Lcom/mapbox/maps/interactions/TypedFeaturesetDescriptor;Lcom/mapbox/maps/FeaturesetFeatureId;Lcom/mapbox/maps/interactions/FeatureStateKey;Lcom/mapbox/maps/FeatureStateOperationCallback;ILjava/lang/Object;)Lcom/mapbox/common/Cancelable;
286
+
public fun removeFeatureStateExpression (ILcom/mapbox/maps/FeatureStateOperationCallback;)V
286
287
public fun removeOnCameraChangeListener (Lcom/mapbox/maps/plugin/delegates/listeners/OnCameraChangeListener;)V
287
288
public fun removeOnMapIdleListener (Lcom/mapbox/maps/plugin/delegates/listeners/OnMapIdleListener;)V
288
289
public fun removeOnMapLoadErrorListener (Lcom/mapbox/maps/plugin/delegates/listeners/OnMapLoadErrorListener;)V
@@ -296,6 +297,7 @@ public final class com/mapbox/maps/MapboxMap : com/mapbox/maps/MapboxStyleManage
296
297
public fun removeOnStyleImageMissingListener (Lcom/mapbox/maps/plugin/delegates/listeners/OnStyleImageMissingListener;)V
297
298
public fun removeOnStyleImageUnusedListener (Lcom/mapbox/maps/plugin/delegates/listeners/OnStyleImageUnusedListener;)V
298
299
public fun removeOnStyleLoadedListener (Lcom/mapbox/maps/plugin/delegates/listeners/OnStyleLoadedListener;)V
300
+
public fun resetFeatureStateExpressions (Lcom/mapbox/maps/FeatureStateOperationCallback;)V
299
301
public final fun resetFeatureStates (Lcom/mapbox/maps/interactions/TypedFeaturesetDescriptor;)Lcom/mapbox/common/Cancelable;
300
302
public final fun resetFeatureStates (Lcom/mapbox/maps/interactions/TypedFeaturesetDescriptor;Lcom/mapbox/maps/FeatureStateOperationCallback;)Lcom/mapbox/common/Cancelable;
301
303
public final fun resetFeatureStates (Ljava/lang/String;Lcom/mapbox/maps/FeatureStateOperationCallback;)Lcom/mapbox/common/Cancelable;
@@ -316,6 +318,7 @@ public final class com/mapbox/maps/MapboxMap : com/mapbox/maps/MapboxStyleManage
316
318
public fun setFeatureState (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lcom/mapbox/bindgen/Value;Lcom/mapbox/maps/FeatureStateOperationCallback;)Lcom/mapbox/common/Cancelable;
317
319
public static synthetic fun setFeatureState$default (Lcom/mapbox/maps/MapboxMap;Lcom/mapbox/maps/interactions/FeaturesetFeature;Lcom/mapbox/maps/interactions/FeatureState;Lcom/mapbox/maps/FeatureStateOperationCallback;ILjava/lang/Object;)Lcom/mapbox/common/Cancelable;
318
320
public static synthetic fun setFeatureState$default (Lcom/mapbox/maps/MapboxMap;Lcom/mapbox/maps/interactions/TypedFeaturesetDescriptor;Lcom/mapbox/maps/FeaturesetFeatureId;Lcom/mapbox/maps/interactions/FeatureState;Lcom/mapbox/maps/FeatureStateOperationCallback;ILjava/lang/Object;)Lcom/mapbox/common/Cancelable;
321
+
public fun setFeatureStateExpression (ILcom/mapbox/maps/interactions/TypedFeaturesetDescriptor;Lcom/mapbox/bindgen/Value;Lcom/mapbox/maps/interactions/FeatureState;Lcom/mapbox/maps/FeatureStateOperationCallback;)V
319
322
public fun setGestureInProgress (Z)V
320
323
public fun setNorthOrientation (Lcom/mapbox/maps/NorthOrientation;)V
Copy file name to clipboardExpand all lines: maps-sdk/src/main/java/com/mapbox/maps/MapboxMap.kt
+75Lines changed: 75 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -2928,6 +2928,81 @@ class MapboxMap :
2928
2928
}
2929
2929
}
2930
2930
2931
+
/**
2932
+
* Sets a feature state expression that applies to features within the specified featureset.
2933
+
*
2934
+
* All feature states with expressions that evaluate to true will be applied to the feature.
2935
+
* Feature states from later added feature state expressions have higher priority. Regular feature states have higher priority than feature state expressions.
2936
+
* 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.
2937
+
* If an expression is added for a feature set, properties from that feature set are used, not the properties from original sources.
2938
+
*
2939
+
* Note that updates to feature state expressions are asynchronous, so changes made by this method might not be
2940
+
* immediately visible and will have some delay. The displayed data will not be affected immediately.
2941
+
*
2942
+
* @param featureStateExpressionId Unique identifier for the state expression.
2943
+
* @param featureset The featureset descriptor that specifies which featureset the expression applies to.
2944
+
* @param expression The expression to evaluate for the state. Should return boolean.
2945
+
* @param state The `state` object with properties to update with their respective new values.
2946
+
* @param callback The `feature state operation callback` called when the operation completes.
0 commit comments