WEBVTT

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

00:01.160 --> 00:04.840
Now let's display the response on our map.

00:04.840 --> 00:07.040
Scroll down as a review.

00:07.080 --> 00:10.160
We have the user location displayed in blue.

00:10.560 --> 00:15.040
We have markers from Firestore displayed on the map.

00:15.240 --> 00:19.160
And here there is a very important thing we need to make.

00:19.360 --> 00:27.440
We need to allow the user to add one of those Firestore markers to the multiple markers.

00:27.440 --> 00:36.680
So here if we click on any of those markers we are allowing the user to add it to the multiple markers.

00:36.680 --> 00:45.640
So let me check again if is adding markers enabled in the same way as we did before, add it to the

00:45.640 --> 00:52.480
multiple markers list and the ViewModel add marker to multiple multi route points.

00:52.720 --> 00:55.120
Okay, this is very simple.

00:55.160 --> 00:56.240
Scroll down.

00:56.280 --> 00:58.520
We have the marker position.

00:58.520 --> 01:01.880
This is displayed when the user clicks on the map.

01:01.960 --> 01:02.800
Scroll down.

01:02.800 --> 01:09.960
We have the route points displaying the route polyline between the two points.

01:09.960 --> 01:16.120
Under this we need to display the result and the response of multiple points route.

01:16.120 --> 01:19.570
So here draw multi points.

01:20.410 --> 01:23.970
Polyline route multi points dot.

01:24.010 --> 01:25.570
Let points.

01:25.570 --> 01:33.970
If points route points are not null, go and create a polyline with points and the color.

01:34.170 --> 01:37.330
You can specify it as magenta.

01:37.330 --> 01:37.930
With.

01:38.210 --> 01:40.810
You can make it as ten for example.

01:41.050 --> 01:41.970
This is good.

01:41.970 --> 01:45.890
And here we can display multiple markers.

01:45.890 --> 01:48.410
Start with multiple markers.

01:48.410 --> 01:51.130
List dot for each marker.

01:51.290 --> 01:53.210
Go and create a marker.

01:53.330 --> 01:58.610
Set the title selected position snippet marker, latitude and longitude.

01:58.650 --> 02:07.210
You can create also like a color, a specified color and icon for the multiple markers.

02:07.330 --> 02:09.730
So scroll down to here.

02:09.890 --> 02:11.650
Specify the icon.

02:11.650 --> 02:13.930
Check what we can add.

02:14.050 --> 02:17.450
You can add to a violet yellow rose.

02:17.530 --> 02:18.810
Let me add rose.

02:18.970 --> 02:28.370
So those icons refer to multiple markers and the route between them is displayed in magenta.

02:28.370 --> 02:34.570
Let me run our application and see the logic that we created.

02:34.570 --> 02:36.170
This is our application.

02:36.290 --> 02:41.650
Let me move to here and you can notice this is the marker position.

02:41.690 --> 02:46.530
We can click on this fab and multi markers.

02:46.810 --> 02:49.970
Let me add in Uruguay.

02:50.530 --> 02:54.050
You can notice that the rose color of the marker.

02:54.210 --> 03:00.370
This is the third the second one the third one here and the fourth one here.

03:00.570 --> 03:03.490
Then click draw root.

03:03.530 --> 03:05.610
And here we go guys.

03:05.770 --> 03:07.250
Congratulations.

03:07.490 --> 03:10.250
It's very amazing I love it guys.

03:10.490 --> 03:12.690
This is the most important.

03:12.690 --> 03:17.490
And this is the most complex application I've ever built.

03:17.610 --> 03:19.570
There are a lot of things.

03:19.570 --> 03:29.290
There are a lot of concepts, a lot of Android complex things that we group together in this application.

03:29.330 --> 03:33.290
You notice, guys, this is a lovely application.

03:33.490 --> 03:37.130
And by the way I'm going to put it on Play Store.

03:37.250 --> 03:40.210
Okay so congratulations guys.

03:40.370 --> 03:46.570
Again and again this is a very important application we've ever built together.
