-
Notifications
You must be signed in to change notification settings - Fork 1.5k
docs: adding sample with Clustering Algorithms #1567
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
Conversation
Code Coverage
|
demo/src/main/java/com/google/maps/android/utils/demo/ClusterAlgorithmsDemoActivity.kt
Fixed
Show fixed
Hide fixed
demo/src/main/java/com/google/maps/android/utils/demo/ClusterAlgorithmsDemoActivity.kt
Outdated
Show resolved
Hide resolved
demo/src/main/java/com/google/maps/android/utils/demo/ClusterAlgorithmsDemoActivity.kt
Outdated
Show resolved
Hide resolved
| 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")) | ||
| } |
There was a problem hiding this comment.
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(...)
}
demo/src/main/java/com/google/maps/android/utils/demo/ClusterAlgorithmsDemoActivity.kt
Outdated
Show resolved
Hide resolved
demo/src/main/java/com/google/maps/android/utils/demo/ClusterAlgorithmsDemoActivity.kt
Outdated
Show resolved
Hide resolved
|
|
||
| // 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
| 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 PR is included in version 3.16.0 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
|
🎉 This PR is included in version 3.16.0 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
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