Welcome back.
In this video we're going to use geocoding and reverse geocoding with gestures.
So we're going to allow the user when he clicks on any place on the map.
We're going to get the address and the coordinates.
It's very simple.
We get it the the coordinates in the previous video.
So when the user clicks on any marker, the selected marker card will change the latitude and longitude.
Now let's get the address and display it here.
Scroll up and go to Google Map Parameters on a map click.
We need to do a geocoding and reverse geocoding.
So geocoding to get address of the clicked marker coroutine scope address reverse geocode one.
And if we don't get the address and we don't, we don't succeed in getting the address.
Go and display the unknown address message.
Let's run.
And here we need to pass the location.
My lat long, my lat long, which is the parameter here of the lambda expression and the location,
the variable that we created especially for the geocoding.
So don't miss it.
In order to update the location, let's run again.
Zoom in into Malaysia and click here.
We have this marker and you notice that we fetched the address correctly and the coordinates of the
selected marker.
Let's create uh, another marker in Italy for example I love Italy.
Let's go to Rome and click here.
You notice the address is updated.
Let's click here.
You notice that the address is changed okay.
So congratulations guys.
This is how we use geocoding and reverse geocoding in Google Maps with gestures.