Skip to content

Commit 08af3bf

Browse files
evil159natiginfo
authored andcommitted
[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 <[email protected]> GitOrigin-RevId: e1a70ef455a6ecf4bee1767fce8a1dcb32d0ec11
1 parent 43b4db8 commit 08af3bf

File tree

13 files changed

+303
-1
lines changed

13 files changed

+303
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ Mapbox welcomes participation and contributions from everyone.
1414
* Add `GeoJsonSource.minZoom` property.
1515
* Add `RasterArraySource.volatile` experimental property.
1616
* 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.
1718

1819
## Bug fixes 🐞
1920
* Fix camera listener not unsubscribed when disabling ScaleBar via `updateSettings { enabled = false }`

app/src/main/java/com/mapbox/maps/testapp/examples/StandardStyleInteractionsActivity.kt

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ import android.annotation.SuppressLint
44
import android.graphics.Color
55
import android.os.Bundle
66
import android.view.Gravity
7+
import android.view.Menu
8+
import android.view.MenuItem
79
import android.view.ViewGroup
810
import android.view.ViewGroup.LayoutParams.WRAP_CONTENT
911
import android.widget.TextView
@@ -13,10 +15,14 @@ import com.mapbox.geojson.Point
1315
import com.mapbox.maps.ClickInteraction
1416
import com.mapbox.maps.MapInitOptions
1517
import com.mapbox.maps.MapView
18+
import com.mapbox.maps.MapboxDelicateApi
1619
import com.mapbox.maps.MapboxExperimental
20+
import com.mapbox.maps.MapboxMap
1721
import com.mapbox.maps.Style
1822
import com.mapbox.maps.ViewAnnotationAnchor
1923
import com.mapbox.maps.dsl.cameraOptions
24+
import com.mapbox.maps.extension.style.expressions.dsl.generated.boolean
25+
import com.mapbox.maps.interactions.standard.generated.StandardBuildings
2026
import com.mapbox.maps.interactions.standard.generated.StandardBuildingsState
2127
import com.mapbox.maps.interactions.standard.generated.StandardPlaceLabelsState
2228
import com.mapbox.maps.interactions.standard.generated.StandardPoiFeature
@@ -25,6 +31,7 @@ import com.mapbox.maps.interactions.standard.generated.StandardPoiStateKey
2531
import com.mapbox.maps.interactions.standard.generated.standardBuildings
2632
import com.mapbox.maps.interactions.standard.generated.standardPlaceLabels
2733
import com.mapbox.maps.interactions.standard.generated.standardPoi
34+
import com.mapbox.maps.testapp.R
2835
import com.mapbox.maps.viewannotation.annotationAnchor
2936
import com.mapbox.maps.viewannotation.geometry
3037
import com.mapbox.maps.viewannotation.viewAnnotationOptions
@@ -34,7 +41,9 @@ import com.mapbox.maps.viewannotation.viewAnnotationOptions
3441
*/
3542
@OptIn(MapboxExperimental::class)
3643
class StandardStyleInteractionsActivity : AppCompatActivity() {
44+
private lateinit var mapboxMap: MapboxMap
3745

46+
@OptIn(MapboxDelicateApi::class)
3847
@SuppressLint("SetTextI18n")
3948
override fun onCreate(savedInstanceState: Bundle?) {
4049
super.onCreate(savedInstanceState)
@@ -50,6 +59,7 @@ class StandardStyleInteractionsActivity : AppCompatActivity() {
5059
)
5160
)
5261
setContentView(mapView)
62+
mapboxMap = mapView.mapboxMap
5363
val map = mapView.mapboxMap
5464
val selectedPoiList = mutableListOf<StandardPoiFeature>()
5565

@@ -61,7 +71,7 @@ class StandardStyleInteractionsActivity : AppCompatActivity() {
6171
map.setFeatureState(
6272
selectedBuilding,
6373
StandardBuildingsState {
64-
highlight(true)
74+
select(true)
6575
}
6676
)
6777
return@standardBuildings true
@@ -146,14 +156,32 @@ class StandardStyleInteractionsActivity : AppCompatActivity() {
146156
StandardPoiStateKey.HIDE
147157
)
148158
}
159+
map.resetFeatureStateExpressions()
149160
selectedPoiList.clear()
150161
mapView.viewAnnotationManager.removeAllViewAnnotations()
162+
151163
Toast.makeText(this, "Map clicked, removing selected POIs if any", Toast.LENGTH_SHORT).show()
152164
true
153165
}
154166
)
155167
}
156168

169+
override fun onCreateOptionsMenu(menu: Menu): Boolean {
170+
menuInflater.inflate(R.menu.menu_standard_style_interactions, menu)
171+
return true
172+
}
173+
174+
@OptIn(MapboxDelicateApi::class)
175+
override fun onOptionsItemSelected(item: MenuItem): Boolean {
176+
return when (item.itemId) {
177+
R.id.menu_action_select_all -> {
178+
mapboxMap.setFeatureStateExpression(1, StandardBuildings(), boolean { literal(true) }, StandardBuildingsState.Builder().select(true).build())
179+
true
180+
}
181+
else -> super.onOptionsItemSelected(item)
182+
}
183+
}
184+
157185
private companion object {
158186
private val HELSINKI = Point.fromLngLat(24.94180921290157, 60.171227338006844)
159187
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<menu xmlns:android="http://schemas.android.com/apk/res/android">
3+
<item
4+
android:id="@+id/menu_action_select_all"
5+
android:title="@string/select_all"/>
6+
</menu>

app/src/main/res/values/strings.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,4 +189,7 @@
189189
<string name="color_theme_reset">Reset</string>
190190
<string name="color_theme_monochrome">Monochrome</string>
191191
<string name="color_theme_toggle_atmosphere">Use theme color for Atmosphere</string>
192+
193+
<!-- Standard style interactions activity -->
194+
<string name="select_all">Select All</string>
192195
</resources>

maps-sdk/api/Release/metalava.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,7 @@ package com.mapbox.maps {
276276
}));
277277
method @com.mapbox.maps.MapboxDelicateApi @com.mapbox.maps.MapboxExperimental public <FS extends com.mapbox.maps.interactions.FeatureState, FSK extends com.mapbox.maps.interactions.FeatureStateKey<FS>> com.mapbox.common.Cancelable removeFeatureState(com.mapbox.maps.interactions.TypedFeaturesetDescriptor<FS,?> descriptor, com.mapbox.maps.FeaturesetFeatureId id, FSK? stateKey = null);
278278
method @com.mapbox.maps.MapboxDelicateApi @com.mapbox.maps.MapboxExperimental public <FS extends com.mapbox.maps.interactions.FeatureState, FSK extends com.mapbox.maps.interactions.FeatureStateKey<FS>> com.mapbox.common.Cancelable removeFeatureState(com.mapbox.maps.interactions.TypedFeaturesetDescriptor<FS,?> descriptor, com.mapbox.maps.FeaturesetFeatureId id);
279+
method @com.mapbox.maps.MapboxDelicateApi @com.mapbox.maps.MapboxExperimental public void removeFeatureStateExpression(int featureStateExpressionId, com.mapbox.maps.FeatureStateOperationCallback callback);
279280
method @Deprecated public void removeOnCameraChangeListener(com.mapbox.maps.plugin.delegates.listeners.OnCameraChangeListener onCameraChangeListener);
280281
method @Deprecated public void removeOnMapIdleListener(com.mapbox.maps.plugin.delegates.listeners.OnMapIdleListener onMapIdleListener);
281282
method @Deprecated public void removeOnMapLoadErrorListener(com.mapbox.maps.plugin.delegates.listeners.OnMapLoadErrorListener onMapLoadErrorListener);
@@ -289,6 +290,7 @@ package com.mapbox.maps {
289290
method @Deprecated public void removeOnStyleImageMissingListener(com.mapbox.maps.plugin.delegates.listeners.OnStyleImageMissingListener onStyleImageMissingListener);
290291
method @Deprecated public void removeOnStyleImageUnusedListener(com.mapbox.maps.plugin.delegates.listeners.OnStyleImageUnusedListener onStyleImageUnusedListener);
291292
method @Deprecated public void removeOnStyleLoadedListener(com.mapbox.maps.plugin.delegates.listeners.OnStyleLoadedListener onStyleLoadedListener);
293+
method @com.mapbox.maps.MapboxDelicateApi @com.mapbox.maps.MapboxExperimental public void resetFeatureStateExpressions(com.mapbox.maps.FeatureStateOperationCallback callback);
292294
method public com.mapbox.common.Cancelable resetFeatureStates(String sourceId, String? sourceLayerId, com.mapbox.maps.FeatureStateOperationCallback callback);
293295
method public com.mapbox.common.Cancelable resetFeatureStates(String sourceId, com.mapbox.maps.FeatureStateOperationCallback callback);
294296
method public com.mapbox.common.Cancelable resetFeatureStates(com.mapbox.maps.interactions.TypedFeaturesetDescriptor<?,?> descriptor, com.mapbox.maps.FeatureStateOperationCallback callback = FeatureStateOperationCallback({ var it: com.mapbox.bindgen.Expected<java.lang.String,com.mapbox.bindgen.None> ->
@@ -315,6 +317,7 @@ package com.mapbox.maps {
315317

316318
}));
317319
method @com.mapbox.maps.MapboxDelicateApi @com.mapbox.maps.MapboxExperimental public <FS extends com.mapbox.maps.interactions.FeatureState> com.mapbox.common.Cancelable setFeatureState(com.mapbox.maps.interactions.TypedFeaturesetDescriptor<FS,?> descriptor, com.mapbox.maps.FeaturesetFeatureId id, FS state);
320+
method @com.mapbox.maps.MapboxDelicateApi @com.mapbox.maps.MapboxExperimental public <FS extends com.mapbox.maps.interactions.FeatureState> void setFeatureStateExpression(int featureStateExpressionId, com.mapbox.maps.interactions.TypedFeaturesetDescriptor<FS,?> featureset, com.mapbox.bindgen.Value expression, FS state, com.mapbox.maps.FeatureStateOperationCallback callback);
318321
method public void setGestureInProgress(boolean inProgress);
319322
method public void setNorthOrientation(com.mapbox.maps.NorthOrientation northOrientation);
320323
method public void setPrefetchZoomDelta(byte delta);

maps-sdk/api/maps-sdk.api

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -282,6 +282,7 @@ public final class com/mapbox/maps/MapboxMap : com/mapbox/maps/MapboxStyleManage
282282
public fun removeFeatureState (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lcom/mapbox/maps/FeatureStateOperationCallback;)Lcom/mapbox/common/Cancelable;
283283
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;
284284
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;
285+
public fun removeFeatureStateExpression (ILcom/mapbox/maps/FeatureStateOperationCallback;)V
285286
public fun removeOnCameraChangeListener (Lcom/mapbox/maps/plugin/delegates/listeners/OnCameraChangeListener;)V
286287
public fun removeOnMapIdleListener (Lcom/mapbox/maps/plugin/delegates/listeners/OnMapIdleListener;)V
287288
public fun removeOnMapLoadErrorListener (Lcom/mapbox/maps/plugin/delegates/listeners/OnMapLoadErrorListener;)V
@@ -295,6 +296,7 @@ public final class com/mapbox/maps/MapboxMap : com/mapbox/maps/MapboxStyleManage
295296
public fun removeOnStyleImageMissingListener (Lcom/mapbox/maps/plugin/delegates/listeners/OnStyleImageMissingListener;)V
296297
public fun removeOnStyleImageUnusedListener (Lcom/mapbox/maps/plugin/delegates/listeners/OnStyleImageUnusedListener;)V
297298
public fun removeOnStyleLoadedListener (Lcom/mapbox/maps/plugin/delegates/listeners/OnStyleLoadedListener;)V
299+
public fun resetFeatureStateExpressions (Lcom/mapbox/maps/FeatureStateOperationCallback;)V
298300
public final fun resetFeatureStates (Lcom/mapbox/maps/interactions/TypedFeaturesetDescriptor;)Lcom/mapbox/common/Cancelable;
299301
public final fun resetFeatureStates (Lcom/mapbox/maps/interactions/TypedFeaturesetDescriptor;Lcom/mapbox/maps/FeatureStateOperationCallback;)Lcom/mapbox/common/Cancelable;
300302
public final fun resetFeatureStates (Ljava/lang/String;Lcom/mapbox/maps/FeatureStateOperationCallback;)Lcom/mapbox/common/Cancelable;
@@ -315,6 +317,7 @@ public final class com/mapbox/maps/MapboxMap : com/mapbox/maps/MapboxStyleManage
315317
public fun setFeatureState (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lcom/mapbox/bindgen/Value;Lcom/mapbox/maps/FeatureStateOperationCallback;)Lcom/mapbox/common/Cancelable;
316318
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;
317319
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;
320+
public fun setFeatureStateExpression (ILcom/mapbox/maps/interactions/TypedFeaturesetDescriptor;Lcom/mapbox/bindgen/Value;Lcom/mapbox/maps/interactions/FeatureState;Lcom/mapbox/maps/FeatureStateOperationCallback;)V
318321
public fun setGestureInProgress (Z)V
319322
public fun setNorthOrientation (Lcom/mapbox/maps/NorthOrientation;)V
320323
public final fun setPrefetchZoomDelta (B)V

maps-sdk/src/main/java/com/mapbox/maps/MapboxMap.kt

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2913,6 +2913,81 @@ class MapboxMap :
29132913
}
29142914
}
29152915

2916+
/**
2917+
* Sets a feature state expression that applies to features within the specified featureset.
2918+
*
2919+
* All feature states with expressions that evaluate to true will be applied to the feature.
2920+
* Feature states from later added feature state expressions have higher priority. Regular feature states have higher priority than feature state expressions.
2921+
* 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.
2922+
* If an expression is added for a feature set, properties from that feature set are used, not the properties from original sources.
2923+
*
2924+
* Note that updates to feature state expressions are asynchronous, so changes made by this method might not be
2925+
* immediately visible and will have some delay. The displayed data will not be affected immediately.
2926+
*
2927+
* @param featureStateExpressionId Unique identifier for the state expression.
2928+
* @param featureset The featureset descriptor that specifies which featureset the expression applies to.
2929+
* @param expression The expression to evaluate for the state. Should return boolean.
2930+
* @param state The `state` object with properties to update with their respective new values.
2931+
* @param callback The `feature state operation callback` called when the operation completes.
2932+
*
2933+
*/
2934+
@MapboxExperimental
2935+
@MapboxDelicateApi
2936+
override fun <FS : FeatureState> setFeatureStateExpression(
2937+
featureStateExpressionId: Int,
2938+
featureset: TypedFeaturesetDescriptor<FS, *>,
2939+
expression: Value,
2940+
state: FS,
2941+
callback: FeatureStateOperationCallback,
2942+
) {
2943+
checkNativeMap("setFeatureStateExpression")
2944+
nativeMap.setFeatureStateExpression(
2945+
featureStateExpressionId,
2946+
featureset.toFeaturesetDescriptor(),
2947+
expression,
2948+
state.internalState,
2949+
callback
2950+
)
2951+
}
2952+
2953+
/**
2954+
* Removes a specific feature state expression.
2955+
*
2956+
* Remove a specific expression from the feature state expressions based on the expression ID.
2957+
*
2958+
* Note that updates to feature state expressions are asynchronous, so changes made by this method might not be
2959+
* immediately visible and will have some delay.
2960+
*
2961+
* @param featureStateExpressionId The unique identifier of the expression to remove.
2962+
* @param callback The `feature state operation callback` called when the operation completes.
2963+
*/
2964+
@MapboxExperimental
2965+
@MapboxDelicateApi
2966+
override fun removeFeatureStateExpression(
2967+
featureStateExpressionId: Int,
2968+
callback: FeatureStateOperationCallback,
2969+
) {
2970+
checkNativeMap("removeFeatureStateExpression")
2971+
nativeMap.removeFeatureStateExpression(featureStateExpressionId, callback)
2972+
}
2973+
2974+
/**
2975+
* Reset all feature state expressions.
2976+
*
2977+
* Note that updates to feature state expressions are asynchronous, so changes made by this method might not be
2978+
* immediately visible and will have some delay.
2979+
*
2980+
* @param callback The `feature state operation callback` called when the operation completes.
2981+
*/
2982+
@MapboxExperimental
2983+
@MapboxDelicateApi
2984+
override fun resetFeatureStateExpressions(
2985+
callback: FeatureStateOperationCallback,
2986+
) {
2987+
checkNativeMap("resetFeatureStateExpressions")
2988+
nativeMap.resetFeatureStateExpressions(callback)
2989+
}
2990+
29162991
/**
29172992
* For internal usage only.
29182993
*/

maps-sdk/src/main/java/com/mapbox/maps/NativeMapImpl.kt

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -797,4 +797,27 @@ internal class NativeMapImpl(val map: Map) {
797797
return map.queryRenderedFeatures(geometry, targets, callback)
798798
}
799799
// ///// END INTERACTIONS /////////
800+
801+
@MapboxExperimental
802+
@OptIn(com.mapbox.annotation.MapboxExperimental::class)
803+
fun setFeatureStateExpression(
804+
featureStateExpressionId: Int,
805+
featureset: FeaturesetDescriptor,
806+
expression: Value,
807+
state: Value,
808+
callback: FeatureStateOperationCallback,
809+
) = map.setFeatureStateExpression(featureStateExpressionId.toLong(), featureset, expression, state, callback)
810+
811+
@MapboxExperimental
812+
@OptIn(com.mapbox.annotation.MapboxExperimental::class)
813+
fun removeFeatureStateExpression(
814+
featureStateExpressionId: Int,
815+
callback: FeatureStateOperationCallback,
816+
) = map.removeFeatureStateExpression(featureStateExpressionId.toLong(), callback)
817+
818+
@MapboxExperimental
819+
@OptIn(com.mapbox.annotation.MapboxExperimental::class)
820+
fun resetFeatureStateExpressions(
821+
callback: FeatureStateOperationCallback,
822+
) = map.resetFeatureStateExpressions(callback)
800823
}

maps-sdk/src/test/java/com/mapbox/maps/MapboxMapTest.kt

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1321,6 +1321,53 @@ class MapboxMapTest {
13211321
}
13221322
}
13231323

1324+
@Test
1325+
@OptIn(MapboxDelicateApi::class)
1326+
fun setFeatureStateExpression() {
1327+
val featureExpressionId = 2345325
1328+
val layerId = "layerId"
1329+
val descriptor = TypedFeaturesetDescriptor.Layer(layerId)
1330+
val state = FeatureState { }
1331+
val expression = Value.nullValue()
1332+
mapboxMap.setFeatureStateExpression(featureExpressionId, descriptor, expression, state) {}
1333+
1334+
verify {
1335+
nativeMap.setFeatureStateExpression(
1336+
featureExpressionId,
1337+
FeaturesetDescriptor(/* featuresetId */ null, /* importId */ null, /* layerId */ layerId),
1338+
expression,
1339+
state.internalState,
1340+
/* callback */ any()
1341+
)
1342+
}
1343+
}
1344+
1345+
@Test
1346+
@OptIn(MapboxDelicateApi::class)
1347+
fun removeFeatureStateExpression() {
1348+
val featureExpressionId = 2643634
1349+
mapboxMap.removeFeatureStateExpression(featureExpressionId) {}
1350+
1351+
verify {
1352+
nativeMap.removeFeatureStateExpression(
1353+
featureExpressionId,
1354+
/* callback */ any()
1355+
)
1356+
}
1357+
}
1358+
1359+
@Test
1360+
@OptIn(MapboxDelicateApi::class)
1361+
fun resetFeatureStateExpressions() {
1362+
mapboxMap.resetFeatureStateExpressions() {}
1363+
1364+
verify {
1365+
nativeMap.resetFeatureStateExpressions(
1366+
/* callback */ any()
1367+
)
1368+
}
1369+
}
1370+
13241371
@Test
13251372
fun queryRenderedFeatures() {
13261373
val geometry = mockk<RenderedQueryGeometry>()

maps-sdk/src/test/java/com/mapbox/maps/NativeMapTest.kt

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -829,6 +829,39 @@ class NativeMapTest {
829829
verify { map.resetFeatureStates(featuresetDescriptor, callback) }
830830
}
831831

832+
@Test
833+
@OptIn(com.mapbox.maps.MapboxExperimental::class, MapboxExperimental::class)
834+
fun setFeatureStateExpression() {
835+
val expression = mockk<Value>()
836+
val nativeMap = NativeMapImpl(map)
837+
838+
val featuresetDescriptor = mockk<FeaturesetDescriptor>()
839+
val state = mockk<Value>()
840+
val callback = mockk<FeatureStateOperationCallback>()
841+
nativeMap.setFeatureStateExpression(3, featuresetDescriptor, state, expression, callback)
842+
verify { map.setFeatureStateExpression(3, featuresetDescriptor, state, expression, callback) }
843+
}
844+
845+
@Test
846+
@OptIn(com.mapbox.maps.MapboxExperimental::class, MapboxExperimental::class)
847+
fun removeFeatureStateExpression() {
848+
val nativeMap = NativeMapImpl(map)
849+
850+
val callback = mockk<FeatureStateOperationCallback>()
851+
nativeMap.removeFeatureStateExpression(3, callback)
852+
verify { map.removeFeatureStateExpression(3, callback) }
853+
}
854+
855+
@Test
856+
@OptIn(com.mapbox.maps.MapboxExperimental::class, MapboxExperimental::class)
857+
fun resetFeatureStateExpressions() {
858+
val nativeMap = NativeMapImpl(map)
859+
860+
val callback = mockk<FeatureStateOperationCallback>()
861+
nativeMap.resetFeatureStateExpressions(callback)
862+
verify { map.resetFeatureStateExpressions(callback) }
863+
}
864+
832865
@Test
833866
fun reduceMemoryUse() {
834867
val nativeMap = NativeMapImpl(map)

0 commit comments

Comments
 (0)