Welcome back.
We created the cluster items.
It's a list of type my cluster item.
We created this cluster manager.
Sorry, I missed manager.
That, uh, is a remember cluster manager composable function that returns a cluster manager of type
cluster item.
Now let's move inside the Google map.
So inside this cube here in marker clustering, we specified the term items and set it to cluster items.
Okay.
Let me run our application.
This is our lovely application.
Let's go to here.
And here we have this is our cluster.
So we can notice that this is a cluster that contains ten plus which is more than ten.
We have 14.
If we zoom in, zoom in, notice the markers zoom in, zoom in, and the seven markers are being displayed
here.
and the the rest are being displayed here.
Okay, so if we zoom out, you can see the markers are grouped in.
And here we go.
Okay.
This is the lovely like the functionality of clustering.
They are very very useful guys because this is a very important thing you can do in in clustering and
how to manage and organize Google Maps.
Okay.
So if you zoom in have the seven markers and the other seven markers here zoom in.
You can notice that this the rest of the seven markers are being displayed okay.
So this is our lovely clustering example.
Let's add more clustering options and features.
Let me go to clustering.
And as I told you before we have items on cluster click item click item info window click and others.
Let me start with on cluster click.
So if I want to handle that.
Click on the markers, for example the cluster.
If I click on this cluster, I need to display a message for this cluster.
So here for example on cluster click go and display you clicked cluster.
We can specify the specify the name of this cluster.
Run open Logcat.
Search for Tagi and let's click on the cluster.
Here we go.
You clicked cluster static cluster center 1.1 and 1.2.
This is the the static cluster.
This is the center coordinates and the items size 14 markers okay.
This is how we handle gestures on clusters.
Now let me make another gesture which is on cluster item clicked.
You click cluster item and we specify the name of the item again.
Let's run.
You clicked the cluster.
Let's zoom in.
This is the first marker from the cluster.
Let me click on it.
You click my eye to my cluster item and the position of this marker.
1.91.2.
The title.
Third snippet ninth and z index 1.9.
Those are the properties of the clicked marker inside the cluster.
Okay, so this is on cluster item.
Click.
Also, you can set the cluster item info window and others.
Okay.
So this is a very important thing you can handle with git clustering.
Okay.
Also you can specify the cluster manager that we specified before.
So this is the cluster manager.
And you specify the cluster manager that we create okay.
But uh for simplicity I'm not gonna create the cluster manager I'm not making use of this.
In this example, I want from you to understand the basic gestures and how to create the clustering.
In this case.
Also you can use on cluster item info window.
So for example let me run again go to here zoom in click on this.
And here we have that cluster item as being clicked.
Also you can set it to false.
And also here on cluster item click set it to false in order to display the info window.
Run it again.
This is the info window being displayed.
So when you return false here it will display the info window.
If I click on it go to look at.
We can notice that we clicked on info window my cluster item and set the details here.
Okay, so we can handle different types of gestures.
In the next video we're going to customize our cluster.