WEBVTT

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

00:01.240 --> 00:07.400
In this video we're going to use geocoding and reverse geocoding with gestures.

00:07.400 --> 00:12.880
So we're going to allow the user when he clicks on any place on the map.

00:13.160 --> 00:17.320
We're going to get the address and the coordinates.

00:17.320 --> 00:18.600
It's very simple.

00:18.720 --> 00:23.760
We get it the the coordinates in the previous video.

00:23.760 --> 00:31.880
So when the user clicks on any marker, the selected marker card will change the latitude and longitude.

00:32.000 --> 00:35.520
Now let's get the address and display it here.

00:35.520 --> 00:43.080
Scroll up and go to Google Map Parameters on a map click.

00:43.360 --> 00:47.920
We need to do a geocoding and reverse geocoding.

00:47.920 --> 00:58.040
So geocoding to get address of the clicked marker coroutine scope address reverse geocode one.

00:58.080 --> 01:05.560
And if we don't get the address and we don't, we don't succeed in getting the address.

01:05.600 --> 01:09.490
Go and display the unknown address message.

01:09.570 --> 01:10.530
Let's run.

01:10.530 --> 01:13.530
And here we need to pass the location.

01:13.530 --> 01:21.330
My lat long, my lat long, which is the parameter here of the lambda expression and the location,

01:21.330 --> 01:26.370
the variable that we created especially for the geocoding.

01:26.370 --> 01:27.770
So don't miss it.

01:27.810 --> 01:31.410
In order to update the location, let's run again.

01:31.450 --> 01:35.730
Zoom in into Malaysia and click here.

01:36.130 --> 01:44.610
We have this marker and you notice that we fetched the address correctly and the coordinates of the

01:44.610 --> 01:46.290
selected marker.

01:46.490 --> 01:54.970
Let's create uh, another marker in Italy for example I love Italy.

01:54.970 --> 01:58.410
Let's go to Rome and click here.

01:58.690 --> 02:01.890
You notice the address is updated.

02:01.890 --> 02:03.450
Let's click here.

02:03.690 --> 02:07.490
You notice that the address is changed okay.

02:07.690 --> 02:09.690
So congratulations guys.

02:09.690 --> 02:17.850
This is how we use geocoding and reverse geocoding in Google Maps with gestures.
