Welcome back.
We talked about the different gestures of Google Map.
We talked about single click.
We talked about long click on the map.
And we saw how we rotate and tilt the map using the UI settings.
Okay.
Now we're going to customize the click on the markers.
In the previous videos we talked about the marker click.
And we said that we use the onClick parameter of the marker.
In order to customize any hand handle the click event on the markers.
Okay.
Now let me customize that and handle the click event on the info window.
Here we have a marker displaying an info window long marker at.
This is the title and the the coordinates of this marker.
We can create for example, let me go up and the long clicked markers.
Here we can specify another parameter called on info window.
Long click or on info window click or on info window close.
We have on info window click or on info window long click.
Let me click on on info window long click and specify that this marker should be removed.
If I long clicked on the info window.
Long clicked markers dot.
Remove this marker.
We need to pass the position which is a lat long.
Okay, let me run long.
Click to add this marker and let me long.
Click on the info window here to remove the marker.
Okay.
You can notice that we successfully added a long clicked marker and then we removed by long.
Click on the info window.
Also we can specify on info window which is not a long click.
We can when the user clicks on the info window of any marker, it will for example, remove this marker,
display a toast message, uh, or uh display an image or whatever you want.
Okay, so this is how we handle the click event on the info window.
Okay.
So this is a quick example about the info window.
Longer click gesture.
So if I want to remove the long click markers I can long click on the info window.
I can customize that window click and other gestures.
Okay.