WEBVTT

00:00.120 --> 00:01.000
Welcome back.

00:01.200 --> 00:04.760
We talked about the different gestures of Google Map.

00:05.000 --> 00:07.080
We talked about single click.

00:07.280 --> 00:09.880
We talked about long click on the map.

00:09.880 --> 00:16.240
And we saw how we rotate and tilt the map using the UI settings.

00:16.360 --> 00:16.840
Okay.

00:17.320 --> 00:22.480
Now we're going to customize the click on the markers.

00:22.640 --> 00:27.400
In the previous videos we talked about the marker click.

00:27.440 --> 00:34.440
And we said that we use the onClick parameter of the marker.

00:34.560 --> 00:40.320
In order to customize any hand handle the click event on the markers.

00:40.360 --> 00:40.840
Okay.

00:41.000 --> 00:47.480
Now let me customize that and handle the click event on the info window.

00:47.800 --> 00:53.680
Here we have a marker displaying an info window long marker at.

00:53.720 --> 00:58.920
This is the title and the the coordinates of this marker.

00:58.960 --> 01:06.140
We can create for example, let me go up and the long clicked markers.

01:06.260 --> 01:14.620
Here we can specify another parameter called on info window.

01:14.660 --> 01:21.260
Long click or on info window click or on info window close.

01:21.260 --> 01:27.340
We have on info window click or on info window long click.

01:27.500 --> 01:37.460
Let me click on on info window long click and specify that this marker should be removed.

01:37.460 --> 01:41.340
If I long clicked on the info window.

01:41.380 --> 01:44.460
Long clicked markers dot.

01:44.500 --> 01:47.460
Remove this marker.

01:47.580 --> 01:51.980
We need to pass the position which is a lat long.

01:52.100 --> 01:54.220
Okay, let me run long.

01:54.220 --> 01:58.860
Click to add this marker and let me long.

01:58.900 --> 02:03.800
Click on the info window here to remove the marker.

02:03.840 --> 02:04.320
Okay.

02:04.560 --> 02:13.320
You can notice that we successfully added a long clicked marker and then we removed by long.

02:13.320 --> 02:16.000
Click on the info window.

02:16.240 --> 02:22.360
Also we can specify on info window which is not a long click.

02:22.600 --> 02:29.400
We can when the user clicks on the info window of any marker, it will for example, remove this marker,

02:29.440 --> 02:35.840
display a toast message, uh, or uh display an image or whatever you want.

02:35.880 --> 02:41.720
Okay, so this is how we handle the click event on the info window.

02:41.760 --> 02:42.240
Okay.

02:42.440 --> 02:47.280
So this is a quick example about the info window.

02:47.320 --> 02:49.360
Longer click gesture.

02:49.520 --> 02:57.080
So if I want to remove the long click markers I can long click on the info window.

02:57.240 --> 03:02.560
I can customize that window click and other gestures.

03:02.600 --> 03:02.920
Okay.
