Skip to content

Commit 04ca3be

Browse files
evil159natiginfo
authored andcommitted
feature state expression API (#8049)
This PR exposes feature state expression API for Maps SDK Android and iOS. https://mapbox.atlassian.net/browse/MAPSIOS-2032 https://mapbox.atlassian.net/browse/MAPSAND-2418 cc @mapbox/maps-ios cc @mapbox/maps-android cc @mapbox/sdk-ci --------- Co-authored-by: Natig Babayev <[email protected]> GitOrigin-RevId: bdcebd8d5c0e05d4c412d21f36be17e2e89d452a
1 parent 7a7e82d commit 04ca3be

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
@@ -193,4 +193,7 @@
193193
<!-- Indoor -->
194194
<string name="activity_indoor">Indoor Manager</string>
195195
<string name="description_indoor">Example showcasing indoor floor selection and state updates</string>
196+
197+
<!-- Standard style interactions activity -->
198+
<string name="select_all">Select All</string>
196199
</resources>

maps-sdk/api/Release/metalava.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,7 @@ package com.mapbox.maps {
277277
}));
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, FSK? stateKey = null);
279279
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);
280+
method @com.mapbox.maps.MapboxDelicateApi @com.mapbox.maps.MapboxExperimental public void removeFeatureStateExpression(int featureStateExpressionId, com.mapbox.maps.FeatureStateOperationCallback callback);
280281
method @Deprecated public void removeOnCameraChangeListener(com.mapbox.maps.plugin.delegates.listeners.OnCameraChangeListener onCameraChangeListener);
281282
method @Deprecated public void removeOnMapIdleListener(com.mapbox.maps.plugin.delegates.listeners.OnMapIdleListener onMapIdleListener);
282283
method @Deprecated public void removeOnMapLoadErrorListener(com.mapbox.maps.plugin.delegates.listeners.OnMapLoadErrorListener onMapLoadErrorListener);
@@ -290,6 +291,7 @@ package com.mapbox.maps {
290291
method @Deprecated public void removeOnStyleImageMissingListener(com.mapbox.maps.plugin.delegates.listeners.OnStyleImageMissingListener onStyleImageMissingListener);
291292
method @Deprecated public void removeOnStyleImageUnusedListener(com.mapbox.maps.plugin.delegates.listeners.OnStyleImageUnusedListener onStyleImageUnusedListener);
292293
method @Deprecated public void removeOnStyleLoadedListener(com.mapbox.maps.plugin.delegates.listeners.OnStyleLoadedListener onStyleLoadedListener);
294+
method @com.mapbox.maps.MapboxDelicateApi @com.mapbox.maps.MapboxExperimental public void resetFeatureStateExpressions(com.mapbox.maps.FeatureStateOperationCallback callback);
293295
method public com.mapbox.common.Cancelable resetFeatureStates(String sourceId, String? sourceLayerId, com.mapbox.maps.FeatureStateOperationCallback callback);
294296
method public com.mapbox.common.Cancelable resetFeatureStates(String sourceId, com.mapbox.maps.FeatureStateOperationCallback callback);
295297
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> ->
@@ -316,6 +318,7 @@ package com.mapbox.maps {
316318

317319
}));
318320
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);
321+
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);
319322
method public void setGestureInProgress(boolean inProgress);
320323
method public void setNorthOrientation(com.mapbox.maps.NorthOrientation northOrientation);
321324
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
@@ -283,6 +283,7 @@ public final class com/mapbox/maps/MapboxMap : com/mapbox/maps/MapboxStyleManage
283283
public fun removeFeatureState (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lcom/mapbox/maps/FeatureStateOperationCallback;)Lcom/mapbox/common/Cancelable;
284284
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;
285285
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
286287
public fun removeOnCameraChangeListener (Lcom/mapbox/maps/plugin/delegates/listeners/OnCameraChangeListener;)V
287288
public fun removeOnMapIdleListener (Lcom/mapbox/maps/plugin/delegates/listeners/OnMapIdleListener;)V
288289
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
296297
public fun removeOnStyleImageMissingListener (Lcom/mapbox/maps/plugin/delegates/listeners/OnStyleImageMissingListener;)V
297298
public fun removeOnStyleImageUnusedListener (Lcom/mapbox/maps/plugin/delegates/listeners/OnStyleImageUnusedListener;)V
298299
public fun removeOnStyleLoadedListener (Lcom/mapbox/maps/plugin/delegates/listeners/OnStyleLoadedListener;)V
300+
public fun resetFeatureStateExpressions (Lcom/mapbox/maps/FeatureStateOperationCallback;)V
299301
public final fun resetFeatureStates (Lcom/mapbox/maps/interactions/TypedFeaturesetDescriptor;)Lcom/mapbox/common/Cancelable;
300302
public final fun resetFeatureStates (Lcom/mapbox/maps/interactions/TypedFeaturesetDescriptor;Lcom/mapbox/maps/FeatureStateOperationCallback;)Lcom/mapbox/common/Cancelable;
301303
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
316318
public fun setFeatureState (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lcom/mapbox/bindgen/Value;Lcom/mapbox/maps/FeatureStateOperationCallback;)Lcom/mapbox/common/Cancelable;
317319
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;
318320
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
319322
public fun setGestureInProgress (Z)V
320323
public fun setNorthOrientation (Lcom/mapbox/maps/NorthOrientation;)V
321324
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
@@ -2928,6 +2928,81 @@ class MapboxMap :
29282928
}
29292929
}
29302930

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.
2947+
*
2948+
*/
2949+
@MapboxExperimental
2950+
@MapboxDelicateApi
2951+
override fun <FS : FeatureState> setFeatureStateExpression(
2952+
featureStateExpressionId: Int,
2953+
featureset: TypedFeaturesetDescriptor<FS, *>,
2954+
expression: Value,
2955+
state: FS,
2956+
callback: FeatureStateOperationCallback,
2957+
) {
2958+
checkNativeMap("setFeatureStateExpression")
2959+
nativeMap.setFeatureStateExpression(
2960+
featureStateExpressionId,
2961+
featureset.toFeaturesetDescriptor(),
2962+
expression,
2963+
state.internalState,
2964+
callback
2965+
)
2966+
}
2967+
2968+
/**
2969+
* Removes a specific feature state expression.
2970+
*
2971+
* Remove a specific expression from the feature state expressions based on the expression ID.
2972+
*
2973+
* Note that updates to feature state expressions are asynchronous, so changes made by this method might not be
2974+
* immediately visible and will have some delay.
2975+
*
2976+
* @param featureStateExpressionId The unique identifier of the expression to remove.
2977+
* @param callback The `feature state operation callback` called when the operation completes.
2978+
*/
2979+
@MapboxExperimental
2980+
@MapboxDelicateApi
2981+
override fun removeFeatureStateExpression(
2982+
featureStateExpressionId: Int,
2983+
callback: FeatureStateOperationCallback,
2984+
) {
2985+
checkNativeMap("removeFeatureStateExpression")
2986+
nativeMap.removeFeatureStateExpression(featureStateExpressionId, callback)
2987+
}
2988+
2989+
/**
2990+
* Reset all feature state expressions.
2991+
*
2992+
* Note that updates to feature state expressions are asynchronous, so changes made by this method might not be
2993+
* immediately visible and will have some delay.
2994+
*
2995+
* @param callback The `feature state operation callback` called when the operation completes.
2996+
*/
2997+
@MapboxExperimental
2998+
@MapboxDelicateApi
2999+
override fun resetFeatureStateExpressions(
3000+
callback: FeatureStateOperationCallback,
3001+
) {
3002+
checkNativeMap("resetFeatureStateExpressions")
3003+
nativeMap.resetFeatureStateExpressions(callback)
3004+
}
3005+
29313006
/**
29323007
* For internal usage only.
29333008
*/

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

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -803,4 +803,27 @@ internal class NativeMapImpl(val map: Map) {
803803
return map.queryRenderedFeatures(geometry, targets, callback)
804804
}
805805
// ///// END INTERACTIONS /////////
806+
807+
@MapboxExperimental
808+
@OptIn(com.mapbox.annotation.MapboxExperimental::class)
809+
fun setFeatureStateExpression(
810+
featureStateExpressionId: Int,
811+
featureset: FeaturesetDescriptor,
812+
expression: Value,
813+
state: Value,
814+
callback: FeatureStateOperationCallback,
815+
) = map.setFeatureStateExpression(featureStateExpressionId.toLong(), featureset, expression, state, callback)
816+
817+
@MapboxExperimental
818+
@OptIn(com.mapbox.annotation.MapboxExperimental::class)
819+
fun removeFeatureStateExpression(
820+
featureStateExpressionId: Int,
821+
callback: FeatureStateOperationCallback,
822+
) = map.removeFeatureStateExpression(featureStateExpressionId.toLong(), callback)
823+
824+
@MapboxExperimental
825+
@OptIn(com.mapbox.annotation.MapboxExperimental::class)
826+
fun resetFeatureStateExpressions(
827+
callback: FeatureStateOperationCallback,
828+
) = map.resetFeatureStateExpressions(callback)
806829
}

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)