Skip to content

Conversation

@kikoso
Copy link
Collaborator

@kikoso kikoso commented Aug 26, 2025

We’ve added a couple of new clustering algorithms this year. Each one has some documentation explaining how it works, but nothing beats a good ol’ sample to show them in action.

New class in Kotlin.

2025-08-26.15.32.49.mp4

@googlemaps-bot
Copy link
Contributor

googlemaps-bot commented Aug 26, 2025

Code Coverage

Overall Project 35.7% 🍏

There is no coverage information present for the Files changed

val lat = 51.5145 + (Random.nextDouble() - 0.5) / 2.0
val lng = -0.1245 + (Random.nextDouble() - 0.5) / 2.0
items.add(MyItem(lat, lng, "Marker #$i", "Snippet for marker #$i"))
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps more idiomatic:

buildList {
add(...)
}


// 4. Point the map's listeners to the ClusterManager
map.setOnCameraIdleListener(clusterManager)
map.setOnMarkerClickListener(clusterManager)

Check warning

Code scanning / Android Lint

Using this method may override behaviors set by the Maps SDK for Android Utility Library. If you are not using clustering, GeoJson, or KML, you can safely suppress this warning, otherwise, refer to the utility library's migration guide: https://bit.ly/3kTpQmY Warning

Using this method may override behaviors set by the Maps SDK for Android Utility Library. If you are not using clustering, GeoJson, or KML, you can safely suppress this warning, otherwise, refer to the utility library's migration guide: https://bit.ly/3kTpQmY
android:layout_height="match_parent">

<!-- Map Fragment -->
<androidx.fragment.app.FragmentContainerView xmlns:android="http://schemas.android.com/apk/res/android"

Check warning

Code scanning / Android Lint

Redundant namespace Warning

This namespace declaration is redundant
@dkhawk dkhawk merged commit 4ada6c9 into main Aug 28, 2025
10 checks passed
@dkhawk dkhawk deleted the docs/added_sample_with_all_algorithms branch August 28, 2025 16:09
@googlemaps-bot
Copy link
Contributor

🎉 This PR is included in version 3.16.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@googlemaps-bot
Copy link
Contributor

🎉 This PR is included in version 3.16.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants