@@ -35,14 +35,21 @@ import com.arcgismaps.ArcGISEnvironment
35
35
import com.arcgismaps.mapping.ArcGISMap
36
36
import com.arcgismaps.mapping.view.LocationDisplay
37
37
import com.arcgismaps.mapping.view.MapView
38
+ import com.arcgismaps.mapping.view.MapViewInteractionOptions
38
39
import kotlinx.coroutines.launch
39
40
41
+ /* *
42
+ * The default instance of [MapViewInteractionOptions]
43
+ */
44
+ public val MapViewInteractionOptionDefaults : MapViewInteractionOptions = MapViewInteractionOptions ()
45
+
40
46
/* *
41
47
* A compose equivalent of the [MapView].
42
48
*
43
49
* @param modifier Modifier to be applied to the Map
44
50
* @param arcGISMap the [ArcGISMap] to be rendered by this composable
45
51
* @param locationDisplay the [LocationDisplay] used by the composable [com.arcgismaps.toolkit.geocompose.Map]
52
+ * @param mapViewInteractionOptions the [MapViewInteractionOptions] used by this composable [com.arcgismaps.toolkit.geocompose.Map]
46
53
* @param onViewpointChanged lambda invoked when the viewpoint of the Map has changed
47
54
* @param overlay the composable overlays to display on top of the Map. Example, a compass, floorfilter etc.
48
55
* @since 200.3.0
@@ -52,6 +59,7 @@ public fun Map(
52
59
modifier : Modifier = Modifier ,
53
60
arcGISMap : ArcGISMap ? = null,
54
61
locationDisplay : LocationDisplay = rememberLocationDisplay(),
62
+ mapViewInteractionOptions : MapViewInteractionOptions = MapViewInteractionOptionDefaults ,
55
63
onViewpointChanged : (() -> Unit )? = null,
56
64
overlay : @Composable () -> Unit = {}
57
65
) {
@@ -69,6 +77,7 @@ public fun Map(
69
77
factory = { mapView },
70
78
update = {
71
79
it.map = arcGISMap
80
+ it.interactionOptions = mapViewInteractionOptions
72
81
it.locationDisplay = locationDisplay
73
82
})
74
83
0 commit comments