Skip to content

Compose MapView: SelectionProperties #173

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,10 @@ import com.arcgismaps.mapping.ArcGISMap
import com.arcgismaps.mapping.view.LocationDisplay
import com.arcgismaps.mapping.view.MapView
import com.arcgismaps.mapping.view.MapViewInteractionOptions
import com.arcgismaps.mapping.view.SelectionProperties
import com.arcgismaps.mapping.view.geometryeditor.GeometryEditor
import kotlinx.coroutines.launch

/**
* The default instance of [MapViewInteractionOptions]
*/
public val MapViewInteractionOptionDefaults: MapViewInteractionOptions = MapViewInteractionOptions()

/**
* A compose equivalent of the [MapView].
*
Expand All @@ -52,6 +48,7 @@ public val MapViewInteractionOptionDefaults: MapViewInteractionOptions = MapView
* @param locationDisplay the [LocationDisplay] used by the composable [com.arcgismaps.toolkit.geocompose.MapView]
* @param geometryEditor the [GeometryEditor] used by the composable [com.arcgismaps.toolkit.geocompose.MapView] to create and edit geometries by user interaction.
* @param mapViewInteractionOptions the [MapViewInteractionOptions] used by this composable [com.arcgismaps.toolkit.geocompose.MapView]
* @param selectionProperties the [SelectionProperties] used by the composable [com.arcgismaps.toolkit.geocompose.MapView].
* @param onViewpointChanged lambda invoked when the viewpoint of the composable MapView has changed
* @param overlay the composable overlays to display on top of the composable MapView. Example, a compass, floorfilter etc.
* @since 200.3.0
Expand All @@ -62,7 +59,8 @@ public fun MapView(
arcGISMap: ArcGISMap? = null,
locationDisplay: LocationDisplay = rememberLocationDisplay(),
geometryEditor: GeometryEditor? = null,
mapViewInteractionOptions: MapViewInteractionOptions = MapViewInteractionOptionDefaults,
mapViewInteractionOptions: MapViewInteractionOptions = MapViewInteractionOptions(),
selectionProperties: SelectionProperties = SelectionProperties(),
onViewpointChanged: (() -> Unit)? = null,
overlay: @Composable () -> Unit = {}
) {
Expand All @@ -76,6 +74,7 @@ public fun MapView(
factory = { mapView },
update = {
it.map = arcGISMap
it.selectionProperties = selectionProperties
it.interactionOptions = mapViewInteractionOptions
it.locationDisplay = locationDisplay
it.geometryEditor = geometryEditor
Expand Down