WEBVTT

00:00.080 --> 00:00.960
Welcome back.

00:01.240 --> 00:10.560
If we double tap on the map, the map will zoom in so we can control the double tap gesture.

00:10.720 --> 00:18.480
The default behavior of double tapping gesture zooms in the map by one level.

00:18.600 --> 00:23.840
You can override this using the UI setting parameter.

00:24.040 --> 00:35.120
Let me scroll up inside the Google map parameters we can discover the Google map and here we have something

00:35.120 --> 00:37.080
called UI settings.

00:37.080 --> 00:42.720
If we open the UI settings, we can control all those gestures.

00:42.760 --> 00:47.080
Compass enabled we can set the compass.

00:47.160 --> 00:54.760
We can set the indoor level picker map toolbar, my location button enabled rotation gesture, scroll,

00:54.760 --> 00:59.040
gesture and tilt zoom control, and so on.

00:59.080 --> 01:12.540
Let me start by controlling the UI settings, map UI settings, And here specify the zoom controls enabled

01:12.540 --> 01:13.900
or zoom gestures.

01:13.900 --> 01:20.620
I need to disable the user from clicking and double tapping the map to zoom in.

01:20.780 --> 01:24.340
Zoom controls enabled equals to false.

01:24.340 --> 01:30.620
Let me run now and see if the zoom gesture is enabled or not.

01:30.660 --> 01:31.420
Here we have.

01:31.420 --> 01:32.540
This is our map.

01:32.580 --> 01:34.620
Double tap double tap.

01:34.740 --> 01:35.180
Oops.

01:35.260 --> 01:40.220
The zoom controls are hidden and not the gestures.

01:40.340 --> 01:46.220
Let me use the zoom gestures enabled run again.

01:46.260 --> 01:52.940
You can notice that zoom controls are enabled and the double tap is disabled.

01:53.140 --> 01:57.060
This is how we control the UI settings of the map.

01:57.060 --> 02:06.060
Also, we can um, like for example, uh, disable others and enable other settings.

02:06.060 --> 02:14.610
For example, if I want to display the compass, uh, on our map here, let me start by compass enabled

02:14.610 --> 02:19.650
equals to true run if we rotate the map.

02:19.850 --> 02:26.610
You can notice that there is a needle here, a compass icon displayed.

02:26.610 --> 02:31.730
If I click on it, it will display the north for me.

02:31.770 --> 02:32.330
Okay.

02:32.370 --> 02:40.090
If I rotate the screen again you can notice that needle is now to the north.

02:40.130 --> 02:44.650
Okay so this is the compass enabled parameter.

02:45.010 --> 02:49.770
There are many parameters that I can specify.

02:49.810 --> 02:53.730
For example my location button enabled.

02:53.930 --> 02:57.690
Let me show you my location button enabled.

02:57.690 --> 02:58.770
Set it to true.

02:58.890 --> 03:00.090
Run again.

03:00.210 --> 03:09.890
Open the extended controls for the emulator by clicking on this, uh this icon three dots.

03:10.210 --> 03:14.330
And this is the Device Extended Controls set.

03:14.370 --> 03:24.590
Go to the location and enable GPS signal and make sure that the location is specified and allowed in

03:24.590 --> 03:25.470
your settings.

03:25.470 --> 03:33.030
So go to the settings of the emulator, search for location and turn it on.

03:33.070 --> 03:37.110
The location is turned on, but there is no app recently accessed.

03:37.110 --> 03:38.110
Location.

03:38.110 --> 03:46.550
We need to specify the location, uh, location permissions in the Android manifest.

03:46.550 --> 03:53.350
So instead of only using the internet permission, we need to use Access network.

03:53.350 --> 03:57.030
State the course location and find location.

03:57.030 --> 04:05.630
The find location and the course location specify allows us to get the correct position of our, uh,

04:05.630 --> 04:10.310
emulator and display our current position on the map.

04:10.550 --> 04:11.030
Okay.

04:11.070 --> 04:12.430
Let me run again.

04:12.750 --> 04:15.790
And here we have our app.

04:15.790 --> 04:20.390
Now we need to check if our app accessed that location.

04:20.390 --> 04:24.790
And it's allowed to get the location from the phone settings.

04:24.790 --> 04:34.860
So go to settings, search for apps, select the maps app and you can notice that no permissions granted.

04:35.060 --> 04:36.540
Click on permissions.

04:36.700 --> 04:42.300
Select the location and allow only when using the app.

04:42.580 --> 04:45.740
Okay, use that precise location.

04:45.860 --> 04:49.420
Go back and run again.

04:49.460 --> 04:53.140
Our application and everything is working fine.

04:53.460 --> 05:02.940
Later, when we display our custom marker on our position, we're going to display a marker on our current

05:02.940 --> 05:03.540
position.

05:03.540 --> 05:09.540
So here you can set in the location the extended controls.

05:09.540 --> 05:16.580
You can you can set like this as a current and a custom location for your current position.

05:16.980 --> 05:21.540
Set location and the location has been set it to this point.

05:21.540 --> 05:22.020
Okay.

05:22.460 --> 05:32.540
So later when we display the marker on our current position, it will appear here in the Manhattan and

05:32.580 --> 05:33.180
New York.

05:33.300 --> 05:33.580
Okay.
