Skip to content

Commit 6994060

Browse files
committed
chore: reset cluster
1 parent 137121c commit 6994060

File tree

1 file changed

+0
-41
lines changed
  • maps-compose-utils/src/main/java/com/google/maps/android/compose/clustering

1 file changed

+0
-41
lines changed

maps-compose-utils/src/main/java/com/google/maps/android/compose/clustering/Clustering.kt

Lines changed: 0 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -126,46 +126,6 @@ public fun <T : ClusterItem> Clustering(
126126
onClusterItemInfoWindowLongClick: (T) -> Unit = { },
127127
clusterContent: @[UiComposable Composable] ((Cluster<T>) -> Unit)? = null,
128128
clusterItemContent: @[UiComposable Composable] ((T) -> Unit)? = null,
129-
) {
130-
Clustering(
131-
items = items,
132-
onClusterClick = onClusterClick,
133-
onClusterItemClick = onClusterItemClick,
134-
onClusterItemInfoWindowClick = onClusterItemInfoWindowClick,
135-
onClusterItemInfoWindowLongClick = onClusterItemInfoWindowLongClick,
136-
clusterContent = clusterContent,
137-
clusterItemContent = clusterItemContent,
138-
onClusterManager = null,
139-
)
140-
}
141-
142-
/**
143-
* Groups many items on a map based on zoom level.
144-
*
145-
* @param items all items to show
146-
* @param onClusterClick a lambda invoked when the user clicks a cluster of items
147-
* @param onClusterItemClick a lambda invoked when the user clicks a non-clustered item
148-
* @param onClusterItemInfoWindowClick a lambda invoked when the user clicks the info window of a
149-
* non-clustered item
150-
* @param onClusterItemInfoWindowLongClick a lambda invoked when the user long-clicks the info
151-
* window of a non-clustered item
152-
* @param clusterContent an optional Composable that is rendered for each [Cluster].
153-
* @param clusterItemContent an optional Composable that is rendered for each non-clustered item.
154-
* @param onClusterManager an optional lambda invoked with the clusterManager as a param when both
155-
* the clusterManager and renderer are set up, allowing callers a customization hook.
156-
*/
157-
@Composable
158-
@GoogleMapComposable
159-
@MapsComposeExperimentalApi
160-
public fun <T : ClusterItem> Clustering(
161-
items: Collection<T>,
162-
onClusterClick: (Cluster<T>) -> Boolean = { false },
163-
onClusterItemClick: (T) -> Boolean = { false },
164-
onClusterItemInfoWindowClick: (T) -> Unit = { },
165-
onClusterItemInfoWindowLongClick: (T) -> Unit = { },
166-
clusterContent: @[UiComposable Composable] ((Cluster<T>) -> Unit)? = null,
167-
clusterItemContent: @[UiComposable Composable] ((T) -> Unit)? = null,
168-
onClusterManager: ((ClusterManager<T>) -> Unit)? = null,
169129
) {
170130
val clusterManager = rememberClusterManager<T>()
171131
val renderer = rememberClusterRenderer(clusterContent, clusterItemContent, clusterManager)
@@ -182,7 +142,6 @@ public fun <T : ClusterItem> Clustering(
182142
clusterManager.setOnClusterItemClickListener(onClusterItemClick)
183143
clusterManager.setOnClusterItemInfoWindowClickListener(onClusterItemInfoWindowClick)
184144
clusterManager.setOnClusterItemInfoWindowLongClickListener(onClusterItemInfoWindowLongClick)
185-
onClusterManager?.invoke(clusterManager)
186145
}
187146

188147
if (clusterManager != null && renderer != null) {

0 commit comments

Comments
 (0)