WEBVTT

00:00.080 --> 00:01.120
Welcome back.

00:01.160 --> 00:03.440
We created the cluster items.

00:03.760 --> 00:07.040
It's a list of type my cluster item.

00:07.080 --> 00:10.080
We created this cluster manager.

00:10.120 --> 00:12.520
Sorry, I missed manager.

00:12.680 --> 00:20.720
That, uh, is a remember cluster manager composable function that returns a cluster manager of type

00:20.720 --> 00:21.880
cluster item.

00:22.120 --> 00:26.400
Now let's move inside the Google map.

00:26.600 --> 00:37.000
So inside this cube here in marker clustering, we specified the term items and set it to cluster items.

00:37.040 --> 00:37.520
Okay.

00:37.720 --> 00:39.680
Let me run our application.

00:39.720 --> 00:41.840
This is our lovely application.

00:42.120 --> 00:44.920
Let's go to here.

00:45.040 --> 00:48.480
And here we have this is our cluster.

00:48.600 --> 00:55.840
So we can notice that this is a cluster that contains ten plus which is more than ten.

00:55.880 --> 00:57.080
We have 14.

00:57.200 --> 01:07.000
If we zoom in, zoom in, notice the markers zoom in, zoom in, and the seven markers are being displayed

01:07.000 --> 01:07.600
here.

01:07.900 --> 01:12.380
and the the rest are being displayed here.

01:12.620 --> 01:16.660
Okay, so if we zoom out, you can see the markers are grouped in.

01:16.820 --> 01:18.460
And here we go.

01:18.820 --> 01:19.340
Okay.

01:19.540 --> 01:25.220
This is the lovely like the functionality of clustering.

01:25.260 --> 01:34.820
They are very very useful guys because this is a very important thing you can do in in clustering and

01:35.140 --> 01:37.940
how to manage and organize Google Maps.

01:38.220 --> 01:38.740
Okay.

01:38.940 --> 01:44.980
So if you zoom in have the seven markers and the other seven markers here zoom in.

01:45.180 --> 01:51.660
You can notice that this the rest of the seven markers are being displayed okay.

01:51.780 --> 01:55.540
So this is our lovely clustering example.

01:55.540 --> 02:00.260
Let's add more clustering options and features.

02:00.260 --> 02:02.260
Let me go to clustering.

02:02.260 --> 02:10.460
And as I told you before we have items on cluster click item click item info window click and others.

02:10.700 --> 02:13.660
Let me start with on cluster click.

02:13.660 --> 02:16.480
So if I want to handle that.

02:16.480 --> 02:19.880
Click on the markers, for example the cluster.

02:20.120 --> 02:25.840
If I click on this cluster, I need to display a message for this cluster.

02:25.920 --> 02:34.440
So here for example on cluster click go and display you clicked cluster.

02:34.480 --> 02:38.880
We can specify the specify the name of this cluster.

02:39.040 --> 02:40.960
Run open Logcat.

02:41.000 --> 02:46.240
Search for Tagi and let's click on the cluster.

02:46.400 --> 02:47.240
Here we go.

02:47.600 --> 02:53.960
You clicked cluster static cluster center 1.1 and 1.2.

02:54.000 --> 02:57.720
This is the the static cluster.

02:57.760 --> 03:05.120
This is the center coordinates and the items size 14 markers okay.

03:05.480 --> 03:08.920
This is how we handle gestures on clusters.

03:08.960 --> 03:15.600
Now let me make another gesture which is on cluster item clicked.

03:15.600 --> 03:21.680
You click cluster item and we specify the name of the item again.

03:21.680 --> 03:22.640
Let's run.

03:22.750 --> 03:25.350
You clicked the cluster.

03:25.350 --> 03:26.550
Let's zoom in.

03:26.830 --> 03:30.030
This is the first marker from the cluster.

03:30.070 --> 03:31.270
Let me click on it.

03:31.510 --> 03:37.390
You click my eye to my cluster item and the position of this marker.

03:37.430 --> 03:39.110
1.91.2.

03:39.430 --> 03:40.110
The title.

03:40.150 --> 03:44.910
Third snippet ninth and z index 1.9.

03:44.950 --> 03:50.510
Those are the properties of the clicked marker inside the cluster.

03:50.590 --> 03:53.990
Okay, so this is on cluster item.

03:53.990 --> 03:54.750
Click.

03:55.070 --> 03:59.870
Also, you can set the cluster item info window and others.

04:00.070 --> 04:00.590
Okay.

04:00.870 --> 04:07.070
So this is a very important thing you can handle with git clustering.

04:07.110 --> 04:07.630
Okay.

04:07.870 --> 04:14.950
Also you can specify the cluster manager that we specified before.

04:15.390 --> 04:18.270
So this is the cluster manager.

04:18.430 --> 04:22.950
And you specify the cluster manager that we create okay.

04:23.150 --> 04:31.290
But uh for simplicity I'm not gonna create the cluster manager I'm not making use of this.

04:31.290 --> 04:38.410
In this example, I want from you to understand the basic gestures and how to create the clustering.

04:38.610 --> 04:40.050
In this case.

04:40.050 --> 04:43.050
Also you can use on cluster item info window.

04:43.050 --> 04:50.090
So for example let me run again go to here zoom in click on this.

04:50.090 --> 04:54.970
And here we have that cluster item as being clicked.

04:55.250 --> 04:57.210
Also you can set it to false.

04:57.210 --> 05:03.770
And also here on cluster item click set it to false in order to display the info window.

05:03.970 --> 05:05.170
Run it again.

05:05.210 --> 05:09.210
This is the info window being displayed.

05:09.210 --> 05:14.050
So when you return false here it will display the info window.

05:14.090 --> 05:17.450
If I click on it go to look at.

05:17.650 --> 05:24.210
We can notice that we clicked on info window my cluster item and set the details here.

05:24.250 --> 05:28.410
Okay, so we can handle different types of gestures.

05:28.410 --> 05:32.170
In the next video we're going to customize our cluster.
